I just want to block access to samba service on the router to a client with a given ip address.
I tried this, but it's not working:
any suggestions? thanks
I tried this, but it's not working:
Code:
iptables -I INPUT -s ipaddress -p udp --dport 445 -j DROP
iptables -I INPUT -s ipaddress —p udp --dport 137 -j DROP
iptables -I INPUT -s ipaddress -p udp --dport 138 -j DROP
iptables -I INPUT -s ipaddress -p udp --dport 139 -j DROP
iptables -I INPUT -s ipaddress -p tcp --dport 445 -j DROP
iptables -I INPUT -s ipaddress —p tcp --dport 137 -j DROP
iptables -I INPUT -s ipaddress -p tcp --dport 138 -j DROP
iptables -I INPUT -s ipaddress -p tcp --dport 139 -j DROP
iptables -I OUTPUT -d ipaddress -p udp --dport 445 -j DROP
iptables -I OUTPUT -d ipaddress —p udp --dport 137 -j DROP
iptables -I OUTPUT -d ipaddress -p udp --dport 138 -j DROP
iptables -I OUTPUT -d ipaddress -p udp --dport 139 -j DROP
iptables -I OUTPUT -d ipaddress -p tcp --dport 445 -j DROP
iptables -I OUTPUT -d ipaddress —p tcp --dport 137 -j DROP
iptables -I OUTPUT -d ipaddress -p tcp --dport 138 -j DROP
iptables -I OUTPUT -d ipaddress -p tcp --dport 139 -j DROP
any suggestions? thanks