So far, I have been using the default firewall because it is generally considered to provide very good protection. However, for beginners it is not very clear, especially when you want to introduce isolating rules, e.g. main network from guest network etc. So, with the help of a network expert, we created our own firewall rules and so far I haven't noticed any problems.
Firewall:
Unfortunately, since yesterday I have had a problem connecting Node-RED with Home Assistant. To be precise, it returns me the following message:
[error] Unable to listen on http://127.0.0.1:1880/
[error] Error: port in use
I even changed the default port 1880 to 2741, but the same thing happens every time. I suspect it's the fault of the firewall or loopback, which is set by default in the RouterOS configuration.
![Image]()
BTW: What do you think about my firewall rules?
Thank you in advance for any tips.
Firewall:
Code:
/ip firewall connection trackingset udp-timeout=10s/ip firewall filteradd action=drop chain=input connection-state=invalid in-interface-list=WANadd action=accept chain=input comment="Start - Firewall for WAN" \ connection-state=established,related in-interface-list=WANadd action=accept chain=input dst-port=8291 in-interface-list=WAN \ protocol=tcpadd action=accept chain=input in-interface-list=WAN protocol=icmpadd action=drop chain=input comment="End - Firewall for WAN" \ in-interface-list=WANadd action=accept chain=input comment="Start - Blocking guest network acces\ s to the router and main gateway." connection-state=\ established,related in-interface-list=Guestadd action=accept chain=input comment="Allowing guests to DNS query" \ dst-port=53 in-interface-list=Guest protocol=udpadd action=drop chain=input comment=\ "End - Blocking guest network access to the router and main gateway." \ in-interface-list=Guestadd action=accept chain=forward in-interface-list=Guest \ out-interface-list=WANadd action=accept chain=forward connection-state=established,related \ in-interface-list=WAN out-interface-list=Guestadd action=drop chain=forward in-interface-list=Guest/ip firewall natadd action=masquerade chain=srcnat comment="defconf: masquerade" \ ipsec-policy=out,none out-interface-list=WAN
Unfortunately, since yesterday I have had a problem connecting Node-RED with Home Assistant. To be precise, it returns me the following message:
[error] Unable to listen on http://127.0.0.1:1880/
[error] Error: port in use
I even changed the default port 1880 to 2741, but the same thing happens every time. I suspect it's the fault of the firewall or loopback, which is set by default in the RouterOS configuration.
![Image](http://i.ibb.co/H704Sg5/ss.png)
BTW: What do you think about my firewall rules?
Thank you in advance for any tips.
Statistics: Posted by SecureInsect — Mon Dec 25, 2023 9:33 pm