EronRackzak
Occasional Visitor
Hi all,
It looks like whenever enabling the SMB service, it opens port 445 on both LAN and WAN interfaces.
I haven't gotten across a way to limit this behavior and keep the SMB service to my local LAN only, which is my objective.
In fact I migrated to RMerlin's firmware (Firmware:3.0.0.4.374.37 on RT-AC68U) with the hope that the ability to introduce IPTABLES rules on a startup script would allow me to manually block this port but all attempts have been unsuccessful.
What is curious, is the fact that through IPTABLES I'm able to successfully enable the FTP service - which shows the same behavior as enabling SMB -and then simply through a couple of rules (taken from another post) make it work on the LAN and block it on the WAN:
iptables -I INPUT -p tcp --destination-port 21 -j DROP
iptables -I INPUT -p tcp --destination-port 21 --source `nvram get lan_ipaddr`/`nvram get lan_netmask` -j ACCEPT
Adding four more rules identical to the above but referencing port 445 and tcp/udp don't do the trick.
Has anybody else come across the same requirement and have been successful at this? I'd appreciate your kind support.
Hugo
It looks like whenever enabling the SMB service, it opens port 445 on both LAN and WAN interfaces.
I haven't gotten across a way to limit this behavior and keep the SMB service to my local LAN only, which is my objective.
In fact I migrated to RMerlin's firmware (Firmware:3.0.0.4.374.37 on RT-AC68U) with the hope that the ability to introduce IPTABLES rules on a startup script would allow me to manually block this port but all attempts have been unsuccessful.
What is curious, is the fact that through IPTABLES I'm able to successfully enable the FTP service - which shows the same behavior as enabling SMB -and then simply through a couple of rules (taken from another post) make it work on the LAN and block it on the WAN:
iptables -I INPUT -p tcp --destination-port 21 -j DROP
iptables -I INPUT -p tcp --destination-port 21 --source `nvram get lan_ipaddr`/`nvram get lan_netmask` -j ACCEPT
Adding four more rules identical to the above but referencing port 445 and tcp/udp don't do the trick.
Has anybody else come across the same requirement and have been successful at this? I'd appreciate your kind support.
Hugo
Last edited: