ufw - Uncomplicated FireWall#

Command Line Options#

Enable UFW#

ufw enable

Disable UFW#

Caution: This is a dangerous action

ufw disable

Firewall Status#

ufw status

Firewall Status With Rule Numbers#

ufw status numbered

Allow Port 80 TCP Inboud#

ufw allow 80/tcp

Delete A Rule By Number#

ufw delete ruleNumber

Delete A Rule By Action#

ufw delete allow 80/tcp

Deny From A Specific IP#

ufw deny from IPAddress

Deny From A Specific Subnet#

ufw deny from IPAddress/Mask

Insert A Rule At Position Number#

ufw insert 1 deny from IPAddress

Include A Comment About The Rule#

ufw allow 80/tcp comment 'Allow HTTP Inbound'