Skip to content

Firewall (UFW)#

Allow SSH#

ufw allow OpenSSH

Allow HTTP#

ufw allow 80/tcp

Allow HTTPS#

ufw allow 443/tcp

Allow Nginx Full#

ufw allow 'Nginx Full'

Allow specific port#

ufw allow 8000/tcp

Enable firewall#

ufw enable

Enable firewall (force)#

ufw --force enable

Disable firewall#

ufw disable

Check firewall status#

ufw status

Check firewall status (verbose)#

ufw status verbose

Delete rule#

ufw delete allow 8000/tcp

Reset firewall#

ufw reset