ubutntu server view firewall rules code example
Example 1: firewall status on ubuntu
$ sudo ufw status
[sudo] password for linuxconfig:
Status: inactive
Example 2: uws firewall commands
$ sudo ufw allow from 192.168.56.1 to any port 22
$ sudo ufw status
[sudo] password for linuxconfig:
Status: inactive
$ sudo ufw allow from 192.168.56.1 to any port 22