Changing firewall settings in Ubuntu is very easy. You can enable, disable or check the status of the firewall with three simple commands. Follow the below commands.
Enable Firewall
sudo ufw enable
Disable Firewall
sudo ufw disable
Check Firewall Status
sudo ufw status