ufw delete all rules

Bug #436608 reported by mdepot on 2009-09-25
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ufw (Ubuntu)
Wishlist
Jamie Strandboge
Nominated for Karmic by Greg Hill

Bug Description

Binary package hint: ufw

It would be useful to have a "ufw delete all" command that deletes all previously added rules.

One good reason for this is there are scripts that can build rules based on dynamic lists. This is commonly done for allowing or blocking by country from one of the many subnet-to-country lists available on the internet. With this feature a script could more easily clear out and rebuild new rules based on a new country list.

Another reason is there seems to be a number of posts on the internet from people wanting to know how to "start from scratch". The response to this often directs people to clear out their ufw rules by manually editing files in /var/lib/ufw/. There should be an easy way to do this so people don't need to modify these files.

Thank you for your consideration of this feature.

Jamie Strandboge (jdstrand) wrote :

Thanks for your feedback! Yes, this would be a nice feature and I agree should be supported.

Changed in ufw (Ubuntu):
importance: Undecided → Wishlist
status: New → Confirmed
Changed in ufw (Ubuntu):
status: Confirmed → Triaged
assignee: nobody → Jamie Strandboge (jdstrand)
milestone: none → ubuntu-10.04
Jamie Strandboge (jdstrand) wrote :

Committed to trunk. This will be in ufw 0.30.

Changed in ufw (Ubuntu):
status: Triaged → Fix Committed
costales (costales) wrote :

Hi! Will be the command:
ufw delete all
?
Thanks!

Jamie Strandboge (jdstrand) wrote :

$ sudo ufw reset

From the manpage:
       reset Disables and resets firewall to installation defaults

Be warned-- this will reset before*rules and after*rules (and there is a prompt).

mdepot (mdepot) wrote :

Regarding your comment "and there is a prompt", will there be a force switch or something that can cause the reset to occur without prompting the user? If you look at my original comments, my main reason for the request was so an automated script (think cron job) could rebuild the rules periodically on it's own. Requiring user interaction would defeat the purpose in this case.

On Tue, 2010-02-16 at 03:34 +0000, mdepot wrote:
> Regarding your comment "and there is a prompt", will there be a force
> switch or something that can cause the reset to occur without prompting
> the user?

Yes:
# ufw --force reset

--
Jamie Strandboge | http://www.canonical.com

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ufw - 0.30pre1-0ubuntu1

---------------
ufw (0.30pre1-0ubuntu1) lucid; urgency=low

  * Pull snapshot from trunk for upcoming release. Fixes:
    LP: #436608
    - run_tests.sh: temporarily disable 'skipped' check since the pre-release
      has one skipped test
  * debian/control: drop versioned depends on iptables. This helps with
    backporting now that the test suite can handle it
  * debian/rules: pass interpreter to run_tests.sh
  * add rsyslog support
 -- Jamie Strandboge <email address hidden> Wed, 17 Feb 2010 09:13:35 -0600

Changed in ufw (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers