[Samba] Samba and UFW

Rowland Penny rpenny at samba.org
Sat Feb 2 14:05:22 UTC 2019


On Fri, 1 Feb 2019 22:15:03 +0000
Rowland Penny via samba <samba at lists.samba.org> wrote:

> 
> Bit late here, I will install ufw tomorrow and see if this throws a
> spanner in the works.
> 

OK, installing ufw threw a spanner did throw a spanner into the
works ;-)

Even after doing this:

sudo ufw allow proto udp to any port 137 from 192.168.0.0/24
sudo ufw allow proto udp to any port 138 from 192.168.0.0/24
sudo ufw allow proto tcp to any port 139 from 192.168.0.0/24
sudo ufw allow proto tcp to any port 445 from 192.168.0.0/24

I could not get through the firewall, all I got was:

Connecting to 192.168.0.27 at port 445
Connecting to 192.168.0.27 at port 139
Connection to stand failed (Error NT_STATUS_IO_TIMEOUT)

A bit of an internet search turned up this command:

sudo ufw allow from 192.168.0.0/16 to any app Samba

This did the trick:

root at rpi1:~# smbclient -L stand
Enter root's password: 
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.8.8-Debian]

	Sharename       Type      Comment
	---------       ----      -------
	print$          Disk      Printer Drivers
	IPC$            IPC       IPC Service (stand server (Samba, Devuan))
Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.8.8-Debian]

	Server               Comment
	---------            -------
	RPI1                 Samba 4.5.12-Debian
	STAND                stand server (Samba, Devuan)

	Workgroup            Master
	---------            -------
	WORKGROUP            RPI1

Rowland





More information about the samba mailing list