Skip to content

Commit c54eeb4

Browse files
authored
Update iptables_fwd_2_intf.sh
1 parent 0175c38 commit c54eeb4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

VirtualNetwork/ExternalVN/iptables_fwd_2_intf.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ iptables -F
1111
iptables -X
1212

1313
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
14+
iptables --tables nat --append POSTROUTING --out-interface $WANIF -j MASQUERADE
15+
iptables --append FORWARD --in-interface $LANIF -j ACCEPT
1716

1817
echo 'Done.'
1918
echo '\n'

0 commit comments

Comments
 (0)