[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2021-02-13 Thread Jamie Strandboge
CzBiX, ufw does not yet manage the nat table (though there have been a couple of false starts). However, it does manage the FORWARD chain with 'ufw route' so it is possible for you to create a chain in the nat table in /etc/ufw/before.rules, and then use ufw route for other things. This is describe

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2020-09-01 Thread CzBiX
Does it possible to add predefined nat chains? Like what the openwrt does. UFW can insert `ufw_prerouting_rule`, `ufw_postrouting_rule` on start, and remove these on stop. User can insert their custom rules in the ufw chains, without worry about the flush/duplicate issues. -- You received this

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2018-12-07 Thread Jamie Strandboge
Please note that the various rules files are there for admins to adjust as needed. However, to work with other programs on the system, I reiterate that by default ufw will not flush anything it doesn't manage itself (MANAGE_BUILTINS, as mentioned, controls this behavior). If someone adds rules to t

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2018-11-23 Thread Maciej Andrzejewski
Is this going to work? It was reported on 2011 and last comment on 2015. It is 2018 and still after restarting ufw rules are added multiple time. Just add this: /etc/ufw/after_up /etc/ufw/after_down /etc/ufw/before_up /etc/ufw/before_down User can manualy add rules to *_up executed when ufw start

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2015-04-21 Thread sven
sry, shorter and corrected: As a workaround, add a flush for the nat chains you want flushed at beginning of the section like this: *nat :POSTROUTING ACCEPT [0:0] -F POSTROUTING -A POSTROUTING -o eth0 -j MASQUERADE COMMIT Warrning: This WILL also delete rules which may have been put there by ot

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2015-04-21 Thread sven
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 CO

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2015-02-20 Thread Jamie Strandboge
Sam, while ufw has added support for managing the FORWARD chain, it does not yet support the nat table which is why you are seeing this issue. Please see comments #1 and #5 in this bug for more details. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscr

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2015-02-07 Thread Sam Stoelinga
Just had the same bug after executing sudo ufw reload 4 times, this is how my iptables -t nat looks like: Chain POSTROUTING (policy ACCEPT) target prot opt source destination MASQUERADE all -- 172.17.0.0/160.0.0.0/0 RETURN all -- 192.168.122.0

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2014-07-31 Thread Jamie Strandboge
@erniecom: as of 0.34 ufw does have route rules now and it also supports customization scripts via /etc/ufw/before.init and /etc/ufw/after..init. See 'man ufw-framework' for details. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. http

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2014-05-27 Thread ñull
Until ufw handles forwarding from the command line, it would be nice to have already a configuration file disable.rules to allow you to add the iptable rules that would fully clean up what was added in before.rules or after.rules. At the moment there is no such mechanism available and we have to st

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2013-11-22 Thread Jamie Strandboge
To be clear, once that is done, work on ufw for managing nat becomes possible. -- 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.ru

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2013-11-22 Thread Jamie Strandboge
The plan has always been to add route rules to ufw (ie, ones that manage the FORWARD chain as well as the builtins in the nat table), but this is on the roadmap. I have a branch I've been working on for FORWARD. Once that is done, managing nat is possible. -- You received this bug notification be

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2013-11-22 Thread Pali
Ok, understood. What about adding ufw chains for *nat table? For clean solution (without MANAGE_BUILTINS=yes) and having *nat table in before.rules this can help. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2013-11-22 Thread Jamie Strandboge
You mentioned in the description that you were modifying the POSTROUTING builtin. ufw does not (currently) manage this particular built-in in any manner and there are no ufw chains in this built-in. Because other software legitimately adds rules to the built-in chains (eg, libvirt), like POSTROUTIN

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2013-11-22 Thread Pali
BUMP, read my previous comment, this is bug. -- 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

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2013-06-20 Thread Pierluca .
It would be essentially sufficient to execute the following commands before re-creating the UFW rules... iptables -X ufw-user-output iptables -X ufw-user-logging-output iptables -X ufw-user-logging-input iptables -X ufw-user-logging-forward iptables -X ufw-user-limit-accept iptables -X ufw-user-li

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2013-01-16 Thread Pali
Please reopen this bug. I'm *not* talking about 3rd applications which adding its own rules to iptables. As I wrote in description I modified *ufw* config file /etc/ufw/before.rules (see example) and when I stopped/reload ufw it does not cleaned above rules specified in ufw config file. So this

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2011-11-08 Thread Jamie Strandboge
Thank you for using Ubuntu and filing a bug. The behavior you describe is actually be design, but is configurable. Many applications will add firewall rules to the various default chains. This is done without the ufw cli command or the ufw framework. As such, performing a flush on 'reload' becomes

[Bug 881137] Re: UFW does not clean iptables setting from /etc/ufw/before.rules

2011-10-25 Thread Jamie Strandboge
** Changed in: ufw (Ubuntu) Assignee: (unassigned) => Jamie Strandboge (jdstrand) ** Visibility changed to: Public ** This bug is no longer flagged as a security vulnerability -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. http