[why] error: Another app is currently holding the xtables lock. Perhaps you want to use the -w option?
[how] add lock wait time. iptables -w 10...
Signed-off-by: Cui Yili 2268260388@qq.com --- sparrow/2-network/iptables | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sparrow/2-network/iptables b/sparrow/2-network/iptables index 48794f5..73f9749 100755 --- a/sparrow/2-network/iptables +++ b/sparrow/2-network/iptables @@ -8,9 +8,9 @@ BR0_IFACE=br0 BR0_SUBNET=172.18.0.0/16
# iptables -t nat -F -iptables -I FORWARD 1 -j ACCEPT -iptables -t nat -A POSTROUTING -o "$PUB_IFACE" -s $BR0_SUBNET -j MASQUERADE -iptables -t nat -A POSTROUTING -o $BR0_IFACE -d $BR0_SUBNET -j MASQUERADE +iptables -w 10 -I FORWARD 1 -j ACCEPT +iptables -w 10 -t nat -A POSTROUTING -o "$PUB_IFACE" -s $BR0_SUBNET -j MASQUERADE +iptables -w 10 -t nat -A POSTROUTING -o $BR0_IFACE -d $BR0_SUBNET -j MASQUERADE
command -v firewall-cmd > /dev/null || { exit 0