UFW - Quickstart

rahuldhole

RAHUL DHOLE

Posted on April 24, 2024

UFW - Quickstart

Most common commands

sudo ufw enable
sudo ufw disable
sudo ufw status numbered
sudo ufw delete 1
sudo systemctl status ufw.service

More commands

Rules

ufw default deny # deny incoming by default
ufw allow from 90.16.45.159 # allow all from IP
Enter fullscreen mode Exit fullscreen mode

Troubleshoot

  1. Disable it first and then add rule and enable it
  2. sudo ufw reload

Issues

  1. It does not block docker ports well

IPTable

Cheat sheet: https://andreafortuna.org/2019/05/08/iptables-a-simple-cheatsheet/

💖 💪 🙅 🚩
rahuldhole
RAHUL DHOLE

Posted on April 24, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

UFW - Quickstart
ufw UFW - Quickstart

April 24, 2024