How to Set Up UFW Firewall on Ubuntu
UFW (Uncomplicated Firewall) is the default firewall tool for Ubuntu. It simplifies iptables configuration with an easy command-line interface.
Install and Enable UFW
sudo apt install ufw sudo ufw enable
Allow Common Services
sudo ufw allow ssh sudo ufw allow http sudo ufw allow https
Check Status
sudo ufw status verbose
Block a Specific IP
sudo ufw deny from 192.168.1.100