{"id":18110,"date":"2022-08-13T18:08:50","date_gmt":"2022-08-13T18:08:50","guid":{"rendered":"https:\/\/linuxways.net\/?p=18110"},"modified":"2022-08-17T03:07:04","modified_gmt":"2022-08-17T03:07:04","slug":"ufw-remove-rule","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/ufw-remove-rule\/","title":{"rendered":"UFW Remove Rule"},"content":{"rendered":"<p>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.<\/p>\n<h2><strong>How to Remove a UFW Rule<\/strong><\/h2>\n<p>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.<\/p>\n<pre>\r\n$ sudo ufw allow 53\/tcp\r\n<\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"410\" height=\"26\" class=\"wp-image-18126\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-18110-1.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-18110-1.png 410w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-18110-1-300x19.png 300w\" sizes=\"auto, (max-width: 410px) 100vw, 410px\" \/><\/strong><\/p>\n<p>The output presented in the following image shows that the specified Firewall rule has been added successfully:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"432\" height=\"76\" class=\"wp-image-18128\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-18110-2.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-18110-2.png 432w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-18110-2-300x53.png 300w\" sizes=\"auto, (max-width: 432px) 100vw, 432px\" \/><\/p>\n<p>Now, we will attempt to remove the very same Firewall rule. For that, we will run the following command:<\/p>\n<pre>\r\n$ sudo ufw delete allow 53\/tcp\r\n<\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"458\" height=\"23\" class=\"wp-image-18130\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-18110-3.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-18110-3.png 458w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-18110-3-300x15.png 300w\" sizes=\"auto, (max-width: 458px) 100vw, 458px\" \/><\/strong><\/p>\n<p>The following output confirms that the specified Firewall rule has been removed successfully.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"490\" height=\"79\" class=\"wp-image-18133\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-18110-4.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-18110-4.png 490w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/08\/word-image-18110-4-300x48.png 300w\" sizes=\"auto, (max-width: 490px) 100vw, 490px\" \/><\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>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.<\/p>","protected":false},"excerpt":{"rendered":"<p>A guide on how to remove any UFW rule that you want, and you only need the exact rule or its associate number to remove any UFW rule of your choice.<\/p>","protected":false},"author":3,"featured_media":18159,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-18110","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/18110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=18110"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/18110\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/18159"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=18110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=18110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=18110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}