Replace iptables to iptables-legacy when NSENTER presents
This commit is contained in:
@@ -383,7 +383,7 @@ if [[ "$PREROUTING" == "true" ]] || [[ "$POSTROUTING" == "true" ]] || [[ "$HOST"
|
||||
IPTABLES="/sbin/iptables -t nat";
|
||||
debug "iptables: "$IPTABLES;
|
||||
else
|
||||
IPTABLES="nsenter -t $(docker inspect --format {{.State.Pid}} $NAME) -n -- /sbin/iptables -t nat";
|
||||
IPTABLES="nsenter -t $(docker inspect --format {{.State.Pid}} $NAME) -n -- /sbin/iptables-legacy -t nat";
|
||||
debug "iptables: "$IPTABLES;
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user