For a Firewall with ufw to be settled up in Ubuntu is really an important aspect in the point of security. In spite of the fact that there may be various approaches to do as such, I pursue the accompanying steps.
sudo apt-get install ufw// Installing ufwsudo ufw default deny incomingsudo ufw default allow outgoing// Setting up the default policiessudo ufw enable// Enabling the Firewallsudo allow 80sudo allow ssh// Allowing few ports and can also be deleted/ deny the ports.sudo ufw disable
Have you also got in love with setting up firewall in ubuntu, then have a look into this