/notebook/linux-basics/ufw

UFW -- Uncomplicated Firewall


To turn on UFW,

sudo ufw allow 22
sudo ufw enable
sudo ufw status
sudo systemctl enable ufw
sudo systemctl start ufw

Adding exceptions

sudo ufw allow <port number or service name>
sudo ufw status numbered
sudo ufw reset
sudo ufw delete <number>

Specific Services

SSH

sudo ufw allow 22/tcp
# or
sudo ufw allow ssh

Samba

sudo ufw allow Samba

syncthing

sudo ufw allow syncthing
sudo ufw allow syncthing-gui

dnsmasq and dhclient

for enabling wifi bridging in ubuntu

sudo ufw allow to any port 53
sudo ufw allow to any port 67 proto udp
sudo ufw allow to any port 68 proto udp

Wireguard

sudo ufw allow 51820/udp

Unknown / Unused

sudo ufw allow 1701/tcp
sudo ufw allow 9901/tcp
sudo ufw allow 50000

External references

About

I am an engineer and educator, having spent ten years as a professor. My goal is to help you build your knowledge of design and technology, get your hardware working, and propel your startup or small business. Get in touch!