Lord_Vader
Regular Contributor
Hi all! Need some of your precious help...
I would like to add exceptions for my VPN on Voxel firmware, and specify VPN-exceptions via ip-addresses.
I'm a total newbie on Linux but I'm able to browse to /etc/openvpn/ via my Mac and Telnet.
But how the heck do I change the ovpnclient-up.sh with these lines below (from Kamoj)
NO_VPN_LST="192.168.1.8 192.168.1.11 192.168.1.12"
NOVPN_TABLE="200"
WAN_GWAY=`ip route | awk '/^default/{print $3}'`
while [ $(ip route list table $NOVPN_TABLE default | grep "default" | wc -l) != "0" ]; do ip route del table $NOVPN_TABLE default 2>/dev/null; done
while [ $(ip route list table $NOVPN_TABLE | grep "default" | wc -l) != "0" ]; do ip route del table $NOVPN_TABLE 2>/dev/null; done
while [ $(ip rule list | grep "lookup $NOVPN_TABLE" | wc -l) != "0" ]; do ip rule del table $NOVPN_TABLE 2>/dev/null; done
ip route flush cache
sleep 1
for excludeip in $NO_VPN_LST; do [ $(ip rule list | grep "${excludeip} lookup $NOVPN_TABLE" | wc -l) = "0" ] && ip rule add from ${excludeip} table $NOVPN_TABLE; done
ip route add default via $WAN_GWAY dev `ip route | awk '/^default/{print $NF}'` table $NOVPN_TABLE
ip route flush cache
I would like to add exceptions for my VPN on Voxel firmware, and specify VPN-exceptions via ip-addresses.
I'm a total newbie on Linux but I'm able to browse to /etc/openvpn/ via my Mac and Telnet.
But how the heck do I change the ovpnclient-up.sh with these lines below (from Kamoj)
NO_VPN_LST="192.168.1.8 192.168.1.11 192.168.1.12"
NOVPN_TABLE="200"
WAN_GWAY=`ip route | awk '/^default/{print $3}'`
while [ $(ip route list table $NOVPN_TABLE default | grep "default" | wc -l) != "0" ]; do ip route del table $NOVPN_TABLE default 2>/dev/null; done
while [ $(ip route list table $NOVPN_TABLE | grep "default" | wc -l) != "0" ]; do ip route del table $NOVPN_TABLE 2>/dev/null; done
while [ $(ip rule list | grep "lookup $NOVPN_TABLE" | wc -l) != "0" ]; do ip rule del table $NOVPN_TABLE 2>/dev/null; done
ip route flush cache
sleep 1
for excludeip in $NO_VPN_LST; do [ $(ip rule list | grep "${excludeip} lookup $NOVPN_TABLE" | wc -l) = "0" ] && ip rule add from ${excludeip} table $NOVPN_TABLE; done
ip route add default via $WAN_GWAY dev `ip route | awk '/^default/{print $NF}'` table $NOVPN_TABLE
ip route flush cache