We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65b8492 commit 9148f3eCopy full SHA for 9148f3e
entrypoint.sh
@@ -64,11 +64,11 @@ for route in "${routes[@]}"; do
64
done
65
66
if [ $OVPN_DEFROUTE -gt 0 ]; then
67
- iptables -t nat -A POSTROUTING -s ${OVPN_NETWORK} -o ${OVPN_NATDEVICE} -j MASQUERADE
+ iptables -t nat -A POSTROUTING -s ${OVPN_NETWORK} -o ${OVPN_NATDEVICE} -j SNAT --to-source $PODIPADDR
68
[ $OVPN_DEFROUTE -gt 1 ] && addArg "--push" "redirect-gateway def1"
69
else
70
for route in "${routes[@]}"; do
71
- iptables -t nat -A POSTROUTING -s ${OVPN_NETWORK} -d $route -o ${OVPN_NATDEVICE} -j MASQUERADE
+ iptables -t nat -A POSTROUTING -s ${OVPN_NETWORK} -d $route -o ${OVPN_NATDEVICE} -j SNAT --to-source $PODIPADDR
72
73
fi
74
0 commit comments