how to delete rules using numbered with ufw using ubuntu via command

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 delete rules using numbered with ufw firewall on ubuntu 22.04 LTS

Step 1: Get UFW Rule list

TO get UFW rules list, You need to execute the following command.

sudo ufw numbered 

Step 2: Delete rules using numbered with ufw

In order to delete rules using numbered with ufw firewall, You need to execute the following command, You need to replace the ufw rule number as per your need, In Case i am using the 1, So that which rule available on number 1 will be deleted by execute the given command.

sudo ufw delete 1

Step 3: Verify UFW status

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

sudo ufw status

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.

Conclusion

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 delete rules using numbered with ufw using ubuntu via command

Leave a Reply

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

Scroll to top