saki2fifty
New Around Here
I have camera's that I do not want to go over the VPN and in the documentation regarding "Bypassing OpenVPN client tunnel", I had to do the following to get it to work.
The script in the docs add the route:
However, when I look at all gateway variables:
... 10.0.0.1 doesn't exist for "wan_gateway", and when ./ovpnclient-up.sh runs, it would not update the table and just errors out with a "netmask 000000ff" error.
The fix was to make 2 changes. Change the WAN_GWAY var, and well as adding "metric 100" to the route:
/etc/openvpn/ovpnclient-up.sh:
Anyways, it may or may not help others... helped me!
The script in the docs add the route:
Code:
/usr/sbin/ip route add table 200 default via $WAN_GWAY dev brwan
However, when I look at all gateway variables:
Code:
root@MyAwesomeVoxelRouter:~$ config show | grep "gateway"
bridge_dhcp_gateway=0.0.0.0
bridge_gateway=0.0.0.0
extender_gateway=0.0.0.0
wan_dhcp_gateway=22.22.22.1
ap_dhcp_gateway=0.0.0.0
lan_gateway=0.0.0.0
wan_gateway=10.0.0.1
ap_gateway=0.0.0.0
... 10.0.0.1 doesn't exist for "wan_gateway", and when ./ovpnclient-up.sh runs, it would not update the table and just errors out with a "netmask 000000ff" error.
The fix was to make 2 changes. Change the WAN_GWAY var, and well as adding "metric 100" to the route:
/etc/openvpn/ovpnclient-up.sh:
Code:
#!/bin/sh
/sbin/ledcontrol -n power -c green -s on
# Don't forget to reserve the list of IPs for exclusion devices on the DHCP server
# Edit the following IP list to bypass the VPN. Seperate individual IP's using a single space between them.
NO_VPN_LST="192.168.1.xx 192.168.1.xx 192.168.1.xx"
WAN_GWAY=`nvram get wan_dhcp_gateway`
for excludeip in $NO_VPN_LST; do
/usr/sbin/ip rule add from $excludeip table 200
done
/usr/sbin/ip route add table 200 default via $WAN_GWAY dev brwan metric 100
/usr/sbin/ip route flush cache
exit 0
Anyways, it may or may not help others... helped me!
Last edited: