check firewall status ubuntu code example
Example 1: disable ufw
$ sudo ufw disable
Firewall stopped and disabled on system startup
Example 2: firewall status on ubuntu
$ sudo ufw status
[sudo] password for linuxconfig:
Status: inactive
$ sudo ufw disable
Firewall stopped and disabled on system startup
$ sudo ufw status
[sudo] password for linuxconfig:
Status: inactive