Setting prerouting and postrouting rules in one process
This commit is contained in:
@@ -183,16 +183,14 @@ if [[ "$PREROUTING" == "true" ]] || [[ "$POSTROUTING" == "true" ]] || [[ "$HOST"
|
||||
IPTABLES="/sbin/iptables -t nat";
|
||||
else
|
||||
IPTABLES="nsenter -t $(docker inspect --format {{.State.Pid}} $NAME) -n -- $IPTABLES -t nat";
|
||||
fi
|
||||
|
||||
debug "iptables: "$IPTABLES;
|
||||
|
||||
if [[ "$PREROUTING" == "true" ]] ; then
|
||||
prerouting;
|
||||
|
||||
elif [[ "$POSTROUTING" == "true" ]] ; then
|
||||
if [[ "$POSTROUTING" == "true" ]] ; then
|
||||
postrouting;
|
||||
|
||||
fi
|
||||
fi;
|
||||
|
||||
else
|
||||
|
Reference in New Issue
Block a user