This blog will discuss how to perform advanced UFW configuration in Ubuntu 22.04:
Let’s get started!
Before jumping into the procedure to perform advanced UFW configuration, it is essential to install UFW in your Ubuntu 22.04.
Follow the below-given instruction to install and configure UFW in Ubuntu 22.04 using the terminal.
First of all, hit “CTRL+ALT+T” and run the below-given command for updating the system packages:
Next, execute the provided command for the installation of UFW:
After successfully installing UFW, check out its status on your system:
The given output indicates that UFW is currently “inactive” on our Ubuntu 22.04:
Now, it’s time to enable UFW with the help of the following command:
In case, if you want to disable UFW, then utilize the below-given command in your Ubuntu 22.04 terminal:
Ubuntu 22.04 permits you to define UFW rules using service name or port number. For instance, to allow incoming connections for port “80”, we will execute the following command:
Again, verifying UFW status will let you know if the proceeding operation was successfully performed:
As you can see, port “80” is allowed to accept incoming connections from “Anywhere”:
Similarly, the “ufw” command with the “deny” option can be utilized for denying the traffic for port “80”:
For the purpose of UFW application list, run the provided command:
We will now verify if the “IPv6” is working perfectly with UFW or not. To do so, open the UFW configuration file in the “nano” editor:
Then look for the line stating “IPV6” and assign “yes” as its value:
After performing the required changes, restart UFW by writing out the following command:
Lastly, check the status of UFW:
The given output shows that UFW is currently active and running on our Ubuntu 22.04 system:
Now, let’s check out the method of configuring the advanced settings of UFW using the GUI application.
As Ubuntu 22.04 user, you can also perform the advanced configuration of UFW using its GUI application. Want to try it out? Hit “CTRL+ALT+T” and execute the provided command for the installation of UFW GUI application named “gufw”:
After successfully installing “gufw”, launch it on your system by searching “Firewall Configuration” in the “Activities” menu and open it from there:
Then, specify your system password for the authentication purpose:
The main interface of “gufw” GUI UFW application will look like this:
To enable the UFW Firewall, enable the highlighted “Status” toggle:
Similarly, select the required option for the “Incoming” and “Outgoing” connections:
In our case, we have denied all incoming connection and allowed UFW to accept outgoing connections:
For the uninstallation of UFW in 22.04, write out the provided command in the terminal:
We have compiled the easiest method to perform advanced UFW configuration in Ubuntu 22.04 using the terminal and its GUI application.
For the purpose of performing advanced UFW configuration in Ubuntu 22.04, firstly install UFW. Then, verify its status with command, enable it on your system, and allow or block incoming or outgoing connections. Furthermore, you can open the “UFW” configuration file and perform the required changes. Also, to use the “gufw” GUI UFW application, install and launch to configured UFW using GUI. This blog demonstrated the procedure of performing advanced UFW configuration in Ubuntu 22.04.
Canonical’s Kubernetes LTS (Long Term Support) will support FedRAMP compliance and receive at least 12…
Welcome to the Ubuntu Weekly Newsletter, Issue 878 for the week of February 2 –…
At Canonical, we firmly believe that delivering an outstanding, customer-centric support experience is impossible without…
I want to share how to install osTicket v1.14 for Ubuntu 20.04 server. osTicket written…
Now I want to share how to install WordPress on ubuntu 20.04 server. WordPress is…
Now I want to share the DNS server installation process on your Ubuntu 20.04 server.…