From eeb4d41f5554f8b232bd4eab9c6bf56797275482 Mon Sep 17 00:00:00 2001 From: Zhe Weng Date: Thu, 20 Oct 2022 16:28:26 +0800 Subject: [PATCH] script: fix simhostroute.sh to remove nat rule correctly Signed-off-by: Zhe Weng --- tools/simhostroute.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/simhostroute.sh b/tools/simhostroute.sh index ff9c900014..53a012e9b2 100755 --- a/tools/simhostroute.sh +++ b/tools/simhostroute.sh @@ -68,7 +68,7 @@ else ip route delete $IP_NUTTX/32 # delete nat rules to clean up - iptables -t nat -A POSTROUTING -o $IF_HOST -j MASQUERADE + iptables -t nat -D POSTROUTING -o $IF_HOST -j MASQUERADE iptables -D FORWARD -i $IF_HOST -o $IF_BRIDGE -m state --state RELATED,ESTABLISHED -j ACCEPT iptables -D FORWARD -i $IF_BRIDGE -o $IF_HOST -j ACCEPT