Skip to content

Commit b8523fc

Browse files
committed
match outgoing interface when perform snat (#2911)
1 parent 0b27996 commit b8523fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dist/images/vpcnatgateway/nat-gateway.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ function add_snat() {
190190
randomFullyOption=${arr[2]}
191191
# check if already exist
192192
iptables-save | grep "SHARED_SNAT" | grep "\-s $internalCIDR" | grep "source $eip" && exit 0
193-
exec_cmd "iptables -t nat -A SHARED_SNAT -s $internalCIDR -j SNAT --to-source $eip $randomFullyOption"
193+
exec_cmd "iptables -t nat -A SHARED_SNAT -o net1 -s $internalCIDR -j SNAT --to-source $eip $randomFullyOption"
194194
done
195195
}
196196
function del_snat() {

0 commit comments

Comments
 (0)