How to enable ufw firewall service on boot in ubuntu 22.04 LTS


UFW, or Uncomplicated Firewall, is a simplified firewall administration interface that hides the complexity of lower-level packet filtering applied sciences such as iptables and nftables. If you’re searching to get began securing your network, and you’re now not positive which device to use, UFW can also be the proper desire for you.

In this post, We will enable the UFW firewall on ubuntu 22.04 LTS

Step 1: Enable on boot UFW 

In order to enable on boot the UFW firewall, You need to execute the following command.

sudo systemctl enable ufw.service

Step 2: Verify UFW status

You need to use the given command to check the status of UFW is enabled or not.

sudo systemctl status ufw.service

You will get a warning that says the command may additionally disrupt current SSH connections. We already set up a firewall rule that permits SSH connections, so it must be best to continue. Respond to the instant with y and hit ENTER.

The firewall is now active. Run the sudo ufw status verbose command to see the policies that are set. The relaxation of this tutorial covers how to use UFW in extra detail, like permitting or denying distinct sorts of connections.


Your firewall is now configured to permit (at least) SSH connections. Be positive to enable any different incoming connections that your server needs, whilst limiting any needless connections, so your server will be practical and secure. 

How to enable ufw firewall service on boot in ubuntu 22.04 LTS

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top