[blfs-systemd-units] 01/02: iptables.service: clear tables when stopping

"Git Owner" ([email protected] via blfs-book Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.beyond.book
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch plabs/no-enable
in repository blfs-systemd-units.

commit 2163d7e6b904263f8a4dcb9eaac95ccab1c7e819
Author: Pierre Labastie <[email protected]>
AuthorDate: Tue May 5 09:23:37 2026 +0200

    iptables.service: clear tables when stopping
---
 blfs/units/iptables.service | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/blfs/units/iptables.service b/blfs/units/iptables.service
index dd8157e..06df4f9 100644
--- a/blfs/units/iptables.service
+++ b/blfs/units/iptables.service
@@ -6,6 +6,15 @@ After=network.target
 [Service]
 Type=forking
 ExecStart=/etc/systemd/scripts/iptables
+ExecStop=/sbin/iptables --policy INPUT   ACCEPT
+ExecStop=/sbin/iptables --policy OUTPUT  ACCEPT
+ExecStop=/sbin/iptables --policy FORWARD ACCEPT
+ExecStop=/sbin/iptables           --flush
+ExecStop=/sbin/iptables -t nat    --flush
+ExecStop=/sbin/iptables -t mangle --flush
+ExecStop=/sbin/iptables           --delete-chain
+ExecStop=/sbin/iptables -t nat    --delete-chain
+ExecStop=/sbin/iptables -t mangle --delete-chain
 TimeoutSec=0
 RemainAfterExit=yes
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

-- 
http://lists.linuxfromscratch.org/sympa/info/blfs-book
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.