As a workaround, add a flush for the nat chains you want flushed at
beginning of the section like this:

*nat
:PREROUTING ACCEPT [4:478]
:INPUT ACCEPT [4:478]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]

-F POSTROUTING

-A POSTROUTING -o eth0 -j MASQUERADE
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT

Warrning: This WILL also delete rules which may have been put there by
other tools! ONLY do this if ufw is the only tool managing the specific
tables/ chains (here: nat POSTROUTING)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/881137

Title:
  UFW does not clean iptables setting from /etc/ufw/before.rules

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ufw/+bug/881137/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to