OpenVPN bypass for specific website in Voxel's firmware

2 posts / 0 new
Last post
benoflondon
benoflondon's picture
OpenVPN bypass for specific website in Voxel's firmware

Hello,

I have Voxel's firmware installed on my R7800 and an OpenVPN client activated.

I copied Kamoj script to have some IPs on my LAN bypassing the VPN tunnel:

/etc/openvpn/ovpnclient-up.sh:

PATH=/bin:/sbin:/usr/bin:/usr/sbin:$PATH
NO_VPN_LST="192.168.1.7 192.168.1.3"
while [ $(ip route list table 200 default | grep "default" | wc -l)
!= "0" ]; do ip route del table 200 default 2>/dev/null; done
while [ $(ip route list table 200 | grep "default" | wc -l) != "0" ]; do ip route del table 200 2>/dev/null; done
while [ $(ip rule list | grep "lookup 200" | wc -l) != "0" ]; do ip rule del table 200 2>/dev/null; done
 
ip route flush cache
sleep 1
 
# Get wan gateway ip address:
WAN_GWAY=`ip route | awk '/^default/{print $3}'`
 
for excludeip in $NO_VPN_LST; do
   [ $(ip rule list | grep "${excludeip} lookup 200" | wc -l) = "0" ] && ip rule add from ${excludeip} table 200
done
 
ip route add table 200 default via $WAN_GWAY dev `ip route | awk '/^default/{print $NF}'`
ip route flush cache

Now I would like to know how to adapt this script so that traffic towards specific websites could be routed out of VPN tunnel even on machines which normally go through that tunnel, a sort of Policy Based Routing.

And more specifically, would it be possible to set rules so that Netflix streaming bypass the VPN and use my normal ISP's access?

Regards,

Trubio
Trubio's picture
Hey I'm basicly trying to do

Hey I'm basicly trying to do the same thing but I'm stuck with issues setting up entware on my router. I'll share a link of what looks like should work. https://www.snbforums.com/threads/selective-routing-for-netflix.42661/ hopefully that helps you