Configuring firewall to allow Samba to work

Nobody <[email protected]> Thu, 13 Mar 2003 02:12:29 -0500
Newsgroups gmane.network.samba.documentation,gmane.network.samba.general
Message-ID <[email protected]>
Dear Folks,

This is a note for all those people out there who had to turn off their 
firewalls (iptables) to get Samba to work.  First start the GUI 
interface to the firewall by typing

[somedir]# redhat-config-securitylevel

Click on "Customize".

Click the check box for your network adapter (usually "eth0").

Click on the checkboxes for any services you want to allow (I allow WWW, 
FTP, SSH, DHCP, and Telnet).

In the "Other ports" edit box, enter 
"137:udp,137:tcp,138:udp,138:tcp,139:udp,139:tcp".  At a command prompt type

[somedir]# service iptables stop
Flushing all chains:                                       [  OK  ]
Removing user defined chains:                              [  OK  ]
Resetting built-in chains to the default ACCEPT policy:    [  OK  ]
[somedir]# service iptables start
Flushing all current rules and user defined chains:        [  OK  ]
Clearing all current rules and user defined chains:        [  OK  ]
Applying iptables firewall rules:                          [  OK  ]

This should allow all the packets necessary for Samba.