4

I have ufw set up to allow samba connections, but this does not seem to allow files to be transferred through Ubuntu's "Personal File Sharing" using the Public folder. The share can be seen, but not accessed if the firewall is active. Are there extra ports that need to be opened?

The default ufw profile opens ports 137, 138, 139 and 445. To this, I've added 135 and 80, but so far, no joy. I do see connection attempts coming in on high ports (32K+) but these are blocked.

Nerdfest
  • 4,658

3 Answers3

5

Or if you want to do it explicitly:

sudo ufw allow proto tcp to any port 135
sudo ufw allow proto udp to any port 137
sudo ufw allow proto udp to any port 138
sudo ufw allow proto tcp to any port 139
sudo ufw allow proto tcp to any port 445
sudo ufw allow proto udp to any port 5353

The first few five rules are Samba. The last is zeroconf to allow other machines on the network to tell your computer about them (it gets names, available resources, etc)

Oli
  • 299,380
3

To allow samba with ufw you can issue the command sudo ufw allow samba. You can then do sudo ufw status to see what ports it has allowed and other useful information.

Though I agree on an internal network a firewall may be entirely unnecessary.

Nick HS
  • 781
0

Personal File Sharing (from the menu option at System → Preferences → Personal File Sharing) uses WebDAV over apache2 instead of Samba AFAIK. It is a different filesharing method from that enabled by the "Sharing Options" menu item found when right-clicking on a folder in Nautilus.

See http://ubuntuforums.org/showthread.php?t=1473760

Since it's WebDAV default port should be 80. Is port 80 open?

koanhead
  • 6,547