From 020d5a862651f165d19328346140ef000a27d348 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 24 Feb 2021 16:29:02 -0500 Subject: [PATCH] Fix incorrect addition of rule to PREROUTING mangle chain In the current iptables init script, the mangle chain has a rule added to jump to the MINIUPNPD table in the mangle chain added to PREROUTING. However, if you look at `iptables_removeall.sh`, it tries to remove the rule from the `FORWARD` chain instead. This changes the init script to add the jump rule to the FORWARD table instead of the PREROUTING table. --- miniupnpd/netfilter/iptables_init.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniupnpd/netfilter/iptables_init.sh b/miniupnpd/netfilter/iptables_init.sh index 6f4081552..a590b3ff4 100755 --- a/miniupnpd/netfilter/iptables_init.sh +++ b/miniupnpd/netfilter/iptables_init.sh @@ -32,11 +32,11 @@ if [ "$MDIRTY" = "${CHAIN}Chain" ]; then echo "Mangle table dirty; Cleaning..." elif [ "$MDIRTY" = "Chain" ]; then echo "Dirty Mangle chain but no reference..? Fixing..." - $IPTABLES -t mangle $ADDCMD PREROUTING -i $EXTIF -j $CHAIN + $IPTABLES -t mangle $ADDCMD FORWARD -i $EXTIF -j $CHAIN else echo "Mangle table clean..initializing..." $IPTABLES -t mangle -N $CHAIN - $IPTABLES -t mangle $ADDCMD PREROUTING -i $EXTIF -j $CHAIN + $IPTABLES -t mangle $ADDCMD FORWARD -i $EXTIF -j $CHAIN fi if [ "$CLEAN" = "yes" ]; then $IPTABLES -t mangle -F $CHAIN