When HOST variable is defined the prerouting and the postrouting segment not executed
This commit is contained in:
@@ -183,19 +183,19 @@ if [[ "$PREROUTING" == "true" ]] || [[ "$POSTROUTING" == "true" ]] || [[ "$HOST"
|
|||||||
|
|
||||||
if [ "$HOST" == "true" ] ; then
|
if [ "$HOST" == "true" ] ; then
|
||||||
IPTABLES="/sbin/iptables -t nat";
|
IPTABLES="/sbin/iptables -t nat";
|
||||||
|
debug "iptables: "$IPTABLES;
|
||||||
else
|
else
|
||||||
IPTABLES="nsenter -t $(docker inspect --format {{.State.Pid}} $NAME) -n -- $IPTABLES -t nat";
|
IPTABLES="nsenter -t $(docker inspect --format {{.State.Pid}} $NAME) -n -- $IPTABLES -t nat";
|
||||||
|
|
||||||
debug "iptables: "$IPTABLES;
|
debug "iptables: "$IPTABLES;
|
||||||
|
fi
|
||||||
if [[ "$PREROUTING" == "true" ]] ; then
|
|
||||||
|
if [[ "$PREROUTING" == "true" ]] ; then
|
||||||
prerouting;
|
prerouting;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$POSTROUTING" == "true" ]] ; then
|
if [[ "$POSTROUTING" == "true" ]] ; then
|
||||||
postrouting;
|
postrouting;
|
||||||
fi
|
fi
|
||||||
fi;
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user