Skip to content

Instantly share code, notes, and snippets.

@reanim8ed
Last active July 20, 2023 16:23
Show Gist options
  • Save reanim8ed/ba324c98a565c9e52a02325155253c38 to your computer and use it in GitHub Desktop.
Save reanim8ed/ba324c98a565c9e52a02325155253c38 to your computer and use it in GitHub Desktop.
[enable/disable firewall on Ubuntu 20.04 (UFW)] #ubuntu

$ sudo ufw status

  • As seen here, our firewall is currently active (on). For more detailed output regarding your current firewall settings, add the verbose option:

$ sudo ufw status verbose

  • To disable the Ubuntu firewall, execute the following command:

$ sudo ufw disable

  • If you decide you need to enable the Ubuntu firewall again later, you can run the following command:

$ sudo ufw enable

  • To control ufw via GUI, you need to install the gufw package with the following command:

$ sudo apt install gufw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment