We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0175c38 commit c54eeb4Copy full SHA for c54eeb4
VirtualNetwork/ExternalVN/iptables_fwd_2_intf.sh
@@ -11,9 +11,8 @@ iptables -F
11
iptables -X
12
13
echo 'Enabling forward and masquerading to all ens3f1 to ens3f0 interface for data traffic'
14
-iptables -A FORWARD -i $LANIF -o $WANIF -m state --state RELATED,ESTABLISHED -j ACCEPT
15
-iptables -A FORWARD -i $LANIF -o $WANIF -j ACCEPT
16
-iptables -t nat -A POSTROUTING -o $LANIF -j MASQUERADE
+iptables --tables nat --append POSTROUTING --out-interface $WANIF -j MASQUERADE
+iptables --append FORWARD --in-interface $LANIF -j ACCEPT
17
18
echo 'Done.'
19
echo '\n'
0 commit comments