Summary
How to configure the Debian firewall UFW
Requirements
- Debian Linux (lightweight install)
- SSH Terminal (Putty or Windows Terminal)
Instructions
Install Firewall package.
1
sudo apt install ufw
Enable UFW Firewall
1
ufw enable
Firewall Status
1
ufw status verbose
Check log in realtime
1
tail -f /var/log/ufw.log
Configure Firewall Policies
Default policy creation
1
2
ufw allow ssh
ufw default deny incoming
Allow rule from IP and port
1
ufw allow from 15.15.15.0/24 to any port 22
Block from IP
1
ufw deny from 61.177.172.114/32 to any
Deleting rules
1
2
ufw delete allow 80
ufw delete allow 443