You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is necessary to modify the code 'if [ "$OVPN_NAT" == "true" ]; then' in the configuration script/opt/configuration/setup_networking.sh to 'if [ "$OVPN_NAT" != "true" ]; then'
`if [ "${OVPN_ROUTES}x" != "x" ] ; then
IFS=","
read -r -a route_list <<< "$OVPN_ROUTES"
echo "" >/tmp/routes_config.txt
for this_route in ${route_list[@]} ; do
echo "routes: adding route $this_route to server config"
echo "push "route $this_route"" >> /tmp/routes_config.txt
if [ "$OVPN_NAT" == "true" ]; then
IFS=" "
this_net=echo $this_route | awk '{ print $1 }'
this_cidr=ipcalc -nb $this_route | grep ^Netmask | awk '{ print $NF }'
IFS=","
to_masquerade="${this_net}/${this_cidr}"
echo "iptables: masquerade from $ovpn_net to $to_masquerade via $this_natdevice"
echo -n "Checking for existing iptables rule: "
iptables -t nat -C POSTROUTING -s "$ovpn_net" -d "$to_masquerade" -o $this_natdevice -j MASQUERADE 2>&1 ||
iptables -t nat -A POSTROUTING -s "$ovpn_net" -d "$to_masquerade" -o $this_natdevice -j MASQUERADE
fi
done
IFS=" "
else`
The text was updated successfully, but these errors were encountered:
It is necessary to modify the code 'if [ "$OVPN_NAT" == "true" ]; then' in the configuration script/opt/configuration/setup_networking.sh to 'if [ "$OVPN_NAT" != "true" ]; then'
`if [ "${OVPN_ROUTES}x" != "x" ] ; then
IFS=","
read -r -a route_list <<< "$OVPN_ROUTES"
echo "" >/tmp/routes_config.txt
for this_route in ${route_list[@]} ; do
echo "routes: adding route $this_route to server config"
echo "push "route $this_route"" >> /tmp/routes_config.txt
if [ "$OVPN_NAT" == "true" ]; then
IFS=" "
this_net=
echo $this_route | awk '{ print $1 }'
this_cidr=
ipcalc -nb $this_route | grep ^Netmask | awk '{ print $NF }'
IFS=","
to_masquerade="${this_net}/${this_cidr}"
echo "iptables: masquerade from $ovpn_net to $to_masquerade via $this_natdevice"
echo -n "Checking for existing iptables rule: "
iptables -t nat -C POSTROUTING -s "$ovpn_net" -d "$to_masquerade" -o $this_natdevice -j MASQUERADE 2>&1 ||
iptables -t nat -A POSTROUTING -s "$ovpn_net" -d "$to_masquerade" -o $this_natdevice -j MASQUERADE
fi
done
IFS=" "
else`
The text was updated successfully, but these errors were encountered: