By default, Ubuntu comes with a firewall configuration tool called UFW (Uncomplicated Firewall) UFW is a user-friendly front-end for managing iptables firewall rules. It’s designed to make managing the iptables firewall easier or as the name says uncomplicated.
If UFW is not installed on your system, you can install the package by typing:
$ sudo apt install ufw
To verify if the package installed successfully, type:
$ sudo ufw status verbose
UFW is disabled by default. If you never activated UFW before, the output will look like this:
And when UFW is activated the output will look similar to the following: