fix: update iptables binary paths to use /usr/sbin instead of /sbin
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
Standardize iptables paths across firewall scripts and Go code to ensure compatibility with systems where iptables is located in /usr/sbin. This affects both legacy and non-legacy iptables binaries.
This commit is contained in:
@@ -407,7 +407,7 @@ for source_ip_index in $(seq 1 $COUNT_SOURCE_IP); do
|
||||
if [[ "$PREROUTING" == "true" ]] || [[ "$POSTROUTING" == "true" ]] || [[ "$HOST" == "true" ]]; then
|
||||
|
||||
if [ "$HOST" == "true" ]; then
|
||||
IPTABLES="/sbin/iptables -t nat"
|
||||
IPTABLES="/usr/sbin/iptables -t nat"
|
||||
debug "iptables: "$IPTABLES
|
||||
else
|
||||
IPTABLES="nsenter -t $(docker inspect --format {{.State.Pid}} $NAME) -n -- /sbin/iptables-legacy -t nat"
|
||||
|
||||
Reference in New Issue
Block a user