When HOST variable is defined the prerouting and the postrouting segment not executed

This commit is contained in:
2022-06-07 05:57:24 +00:00
parent d0b9777bfb
commit c6d89dad8f

View File

@@ -183,19 +183,19 @@ if [[ "$PREROUTING" == "true" ]] || [[ "$POSTROUTING" == "true" ]] || [[ "$HOST"
if [ "$HOST" == "true" ] ; then
IPTABLES="/sbin/iptables -t nat";
debug "iptables: "$IPTABLES;
else
IPTABLES="nsenter -t $(docker inspect --format {{.State.Pid}} $NAME) -n -- $IPTABLES -t nat";
debug "iptables: "$IPTABLES;
if [[ "$PREROUTING" == "true" ]] ; then
fi
if [[ "$PREROUTING" == "true" ]] ; then
prerouting;
fi
fi
if [[ "$POSTROUTING" == "true" ]] ; then
postrouting;
fi
fi;
if [[ "$POSTROUTING" == "true" ]] ; then
postrouting;
fi
else