Friday, September 14, 2007

Pass SAMBA through IPTABLES ......

When you have a firewall (IPTABLES) enabled on your linux server with access to default services, you will need to configure the access to other services manually. The following stpes can be used to allow the samba connections from your local network (192.168.0.0).
Samba connections use the 445/tcp, 139tcp, 137/udp and 138/udp ports. To enable these ports, login to the server as root and run the following commands.
#iptables -I INPUT -s 192.168.0.0/24 -p tcp --dport 445 -j ACCEPT
#iptables -I INPUT -s 192.168.0.0/24 -p tcp --dport 139 -j ACCEPT
#iptables -I INPUT -s 192.168.0.0/24 -p udp --dport 138 -j ACCEPT
#iptables -I INPUT -s 192.168.0.0/24 -p udp --dport 137 -j ACCEPT
#iptables-save > /etc/sysconfig/iptables


That's it, you are done.....

No comments: