Enable Access to Samba Shares on your Ubuntu Box with ufw

Written by James McDonald

December 31, 2009

If your Linux box is a Samba Server and you wish to enable access to it from other computers on your LAN.

Use these ufw commands to work the magic.

sudo ufw allow proto tcp from to port 445
sudo ufw allow proto udp from to port 137
sudo ufw allow proto udp from to port 138
sudo ufw allow proto tcp from to port 139

# Where is your LAN's subnet address 
# and is your Linux Samba box's IP Address.

# when you run ufw status you should get:
sudo ufw status
Status: active

To                         Action      From
--                         ------      ---- 445/tcp      ALLOW 137/udp      ALLOW 138/udp      ALLOW 139/tcp      ALLOW

Port Information from here


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Meraki Open Source Licenses

Until today I assumed that Meraki was built in-house with only closed source software. But having a look at the...


If you have Veeam backup failing with the Updating BCD failed with Cannot update SafeBoot flag and SentinelOne is...