Configuration of the UFW firewall on Ubuntu 20.04
The following guide describes how to install UFW Firewall on Ubuntu 20.04. Everything is done with a few clicks in the console.
At the beginning we update the packages
| 1 | sudo apt update | 
We install UFW
| 1 | sudo apt install ufw | 
The service status can be checked by issuing a command:
| 1 | udo ufw status verbose | 
Score:
| 1 | Status: inactive | 
We will launch the UFW with the help of a command:
| 1 | sudo ufw enable | 
To unblock a given port or service we issue a command:
| 1 | sudo ufw allow NAZWAUSŁUGI | 
Here are some examples:
SSH:
| 1 | sudo ufw allow ssh | 
Http
| 1 | sudo ufw allow http | 
You can also allow access for a given port along with the protocol. An example below:
| 1 | sudo ufw allow 80/tcp | 






