Categories: TutorialsUbuntu

UFW Remove Rule

We all know that a Firewall works on the stated rules. Depending upon the requirements, these rules can be added or omitted from the set of Firewall rules. However, at times, you accidentally add a Firewall rule, or you might not need a certain Firewall rule any longer. In both of these cases, you would feel the need to remove that particular rule. Therefore, in this article, we will teach you how you can remove a UFW rule.

How to Remove a UFW Rule

Before teaching you how you can remove a UFW rule, we will first add a new rule to our Firewall, which we will remove later. To add a new Firewall rule, you can execute the following command. We have added this particular rule for the sake of demonstration. However, you are free to add any rule of your choice.

$

Sponsored
sudo ufw allow 53/tcp

The output presented in the following image shows that the specified Firewall rule has been added successfully:

Now, we will attempt to remove the very same Firewall rule. For that, we will run the following command:

Sponsored
$ sudo ufw delete allow 53/tcp

The following output confirms that the specified Firewall rule has been removed successfully.

Conclusion

By following this very basic yet useful guide, you can quickly remove any UFW rule that you want. All you need to know is the exact rule or its associated number, and you can easily remove any UFW rule of your choice whenever you want.

Ubuntu Server Admin

Recent Posts

Stop Wallpaper Moving when Switching Workspace in Ubuntu 24.04

For GNOME users who don’t like the default workspace switch animation, here’s an extension that…

3 hours ago

Warzone 2100 Released 4.6.0 with Spectator Host Mode

Warzone 2100, the free open-source 3D real-time strategy game, released new major 4.6.0 version few…

1 day ago

What our users make with Ubuntu Pro – Episode 2

How Vaultara achieved FedRAMP compliance with Ubuntu Pro Ubuntu Pro helps businesses worldwide to innovate…

2 days ago

How To Install Zabbix Server 7.4 On Ubuntu 22.04

Zabbix is smart monitoring system on your network. This software written by php mysql. So…

2 days ago

How To Install Zabbix Server 7.2 On Ubuntu 22.04

Zabbix is smart monitoring system on your network. This software written by php mysql. So…

2 days ago

SuperTuxKart 1.5 RC2 added GUI option to Choose Vulkan or DirectX 9

SuperTuxKart, the 3D kart racing game, announced the second release candidate for the next 1.5…

2 days ago