To start / stop firewall service on Ubuntu based server or desktop you can try the following command.
Uncomplicated Firewall (ufw) command : This is used for managing a Linux firewall. It also provides a user friendly interface.
To find the current status of the firewall, you need to login as root user either by using the Terminal (Ctrl+Alt+T) or login over the ssh based session. Then use the following command:
sudo ufw status
The output will be like:
For disabling the firewall:
sudo ufw disable
For enabling the firewall:
sudo ufw enable
Type the following command to reload firewall:
sudo ufw reload
That’s all !!