When I query the netfilter firewall status I get “inactive”:
$ sudo ufw status
Status: inactiveI want to change it so I can see this:
Output
Status: active
To Action From
-- ------ ----
OpenSSH ALLOW Anywhere
Nginx HTTP ALLOW Anywhere
OpenSSH (v6) ALLOW Anywhere (v6)
Nginx HTTP (v6) ALLOW Anywhere (v6)I have been looking but didn't find any info about how to set the status.
01 Answer
You need to run
sudo ufw enableto enable the firewall.
You can get further help on ufw on help.ubuntu.com and man ufw.
Example
$ sudo ufw enable
Firewall is active and enabled on system startup
$ sudo ufw status
Status: active
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
$ sudo ufw disable
Firewall stopped and disabled on system startup
$ sudo ufw status
Status: inactive 0