s
sspade
Nov 16, 2011

What did I do wrong? I installed Samba, but when the firewall is enabled it won't work.

I am running Linux, and installed Samba for file sharing across the network. When the firewall is enabled, Samba will not function. I need to have a firewall up, I can't imagine that the choice is between using Samba and having a firewall. What am I missing?

j
jobeard
09/29/2013

SAMBA access uses TCP port 445, while windows uses ports 138-139 udp & tcp.

When the Linux FW is properly configured, there is no problem- - except

 

compatibility to Win/98, Macintosh and Linux shares

Windows systems need the setting
· Level 1, Send LM and NTLM—use NTLMv2 session security if negotiated

Running strictly V2  *WILL* fail

l
lsmall
11/17/2011

You have to be careful with your firewall for Samba.  If you enable the firewall on the computer that is running Samba, it won't work.  The Linux firewall is supposed to be used between your LAN and internet, but it can keep local users from using Samba.  It is possible, but not all that easy, to configure your firewall so that Samba will be allowed to access only your network.  It is easy to just run Samba on a different computer than the one on which you are running your firewall.  Divide your tasks onto two machines - one for a file server and the other for a firewall.

jimlynch
11/16/2011
Hi sspade,

You might want to take a peek at this Samba troubleshooting article. See the section on Samba and firewalls.

Quick HOWTO : Ch12 : Samba Security and Troubleshooting
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch12_:_S...

"Firewall software installed both on your Windows PCs and on the Samba server itself may prevent Samba from functioning. Two popular firewall packages, iptables and ZoneAlarm offer solutions."
Answer this