It should be installed by default in Ubuntu, but if for some reason it’s not, you can install the package using aptitude or apt-get using the following commands:
sudo apt-get install ufw
Check the Status
sudo apt-get install ufw
Check the Status