10857 questions

12933 answers

20165 comments

25474 members

0 votes
32 views 2 comments
ago by
Hello,

On RUT955 with firmware RUT9_R_00.07.02.3, custom firewall rules doesn't work only after reboot and loses connectivity with the Site PLC. However the same custom firewall rules works when the firewall rules are resaved after every reboot. The firewall rule is as follows :

iptables -A INPUT -p tcp --dport 1883 -s 192.168.x.x-j ACCEPT

iptables -A INPUT -p tcp --dport 1883 -s 10.x.x.x -j ACCEPT

iptables -A INPUT -p tcp --dport 1883 -j DROP

Could someone point out the issue and applicable fix?

1 Answer

0 votes
ago by

Hi,

Iptables rules are temporarily saved by OpenWRT. After each firewall restart/router reboot, iptables rules get cleared. 
So to resolve this issue, you need to save iptables rules using the Custom rules option on the WebUI of the device. Navigate to WebUI, Network → Firewall → Custom Rules page. You can simply copy the same iptables commands and after each reboot, they will be added all over again. 


Please follow the below link for more information:
https://wiki.teltonika-networks.com/view/RUT955_Firewall#Custom_Rules

Regards,
Raman

ago by

Hi Raman,

Thanks for the Reply, the issue I'm facing is with the Custom rules defined in WebUI, Network → Firewall → Custom Rules page. The Custom rules already defined here are not getting executed after the reboot. This needs to be saved every time after reboot to execute. I understand the following note,  "Custom rules are not recommended to be used with hostnames. The rules will not remain active after reboot due to security reasons". The implementation doesn't have any host names as well.

ago by

Hi,

Would you please upgrade your device's firmware to the latest RUTOS RUT9_R_00.07.02.04?
To upgrade firmware, go to WebUI and navigate to the System->Firmware page and Turn off the "Keep settings" options ( this will erase previous configurations and will install firmware as fresh with default configurations. To download the firmware file, please visit the below link:
https://wiki.teltonika-networks.com/view/RUT955_Firmware_Downloads
Afterwards, apply these rules on the customs rules page and save them. Test them with a restart.