How to Allow SMB in UFW on Ubuntu

By Birtchum Thompson | March 11, 2020

This tutorial demonstrates the process of allowing SMB (Samba) traffic in UFW on Ubuntu and Debian operating systems.

An Ubuntu or Debian operating system utilizing UFW (Uncomplicated Firewall) can not connect to SMB network shares by default. Before connecting to the shares, UFW must be configured to allow SMB traffic. Fortunately, the solution is a simple, one-line command. Launch a terminal and enter the following:

 Bash

UFW will now allow all SMB traffic on the appropriate ports. The SMB network shares can now be mounted and used.

Share this Content

Join the Discussion

Also Read

Python logo and red trash can
Delete Files Older than X Days in Python

Create a Python script to delete files older than x days.

Blue KDE Logo
Configure Screen Locking Shortcut in KDE

Learn to configure the screen locking shortcut in KDE.

White Bash Logo
Check Exit Status of Bash Command in a Script

Check a Bash command exit status in a script.

Clock and calendar image with crontab -e as text
Open Crontab with Nano

Learn how to use nano to edit crontab files.