[Pkg-utopia-maintainers] Bug#931722: Firewalld fails when startig and when reloading rules
Ramón García
ramon.garcia.f at gmail.com
Tue Jul 9 16:52:00 BST 2019
Package: firewalld
Version: 0.6.3-5
When one runs firewall-cmd --reload, and when firewalld starts, the
following error appears
2019-07-09 17:02:15 ERROR: '/usr/sbin/iptables-restore -w -n' failed:
iptables-restore v1.8.2 (nf_tables):
line 4: RULE_REPLACE failed (No such file or directory): rule in chain INPUT
line 4: RULE_REPLACE failed (No such file or directory): rule in chain OUTPUT
Fix:
The cause of the bug is that iptables restore fails when both -F and
-Z are applied in the same table (see
https://bugzilla.redhat.com/show_bug.cgi?id=1664829 )
In file /usr/lib/python3/dist-packages/firewall/core/ipXtables.py
remove the flag -Z
--- /usr/lib/python3/dist-packages/firewall/core/ipXtables.py.orig
2019-07-09 17:37:33.915510550 +0200
+++ /usr/lib/python3/dist-packages/firewall/core/ipXtables.py
2019-07-09 17:02:09.251902978 +0200
@@ -551,7 +551,8 @@
# Flush firewall rules: -F
# Delete firewall chains: -X
# Set counter to zero: -Z
- for flag in [ "-F", "-X", "-Z" ]:
+ #for flag in [ "-F", "-X", "-Z" ]:
+ for flag in [ "-F", "-X" ]:
rules.append(["-t", table, flag])
return rules
More information about the Pkg-utopia-maintainers
mailing list