I'm having trouble using wizin's script from post 11.
In the end I want everything to goes through the VPN except for the VoIP, but for now, I copied his script exactly.
I'm pretty sure I have it saved in the right place:
[img=http://s27.postimg.org/55itqf15r/Capture.jpg]
VPN is set to start on WAN.
But still no luck. VOIP (192.168.1.227) still doesn't work, and ROG loses internet access.
Turning off the VPN fixes everything.
Try this script VPN_Select.sh, and U will need to add the directives
route-nopull
script-security 2
route-up /jffs/scripts/VPN_Select.sh
to the Custom VPN dialog box
#!/bin/sh
MY_VPNTAB=101 # Now read from /jffs/configs/VPNSelect
TAG_MARK=1 # Now read from /jffs/configs/VPNSelect
# Use the OpenVPN environment variables
if [ "X$dev" = "X" ]; then
logger -s -t "($(basename $0))" $$ "*** ERROR not called by VPN Client route-up?...ABORTing!"
exit 1
fi
# Create new table to route VPN traffic when tagged with MARK. (Credit to SmallNetBuilder member DJR747)
# or to be associated with a WiFi Guest SSID.
ip route flush table $MY_VPNTAB
ip rule del fwmark $TAG_MARK
ip rule del table $MY_VPNTAB
ip route flush cache
iptables -t mangle -F PREROUTING
# Disable Reverse Path Filtering on current VPN network interface:
echo 0 > /proc/sys/net/ipv4/conf/$dev/rp_filter
ip route add default via $ifconfig_local dev $dev table $MY_VPNTAB
ip rule add fwmark $TAG_MARK table $MY_VPNTAB
# Everything via VPN except .227
iptables -t mangle -A PREROUTING -i br0 -m iprange --src-range 192.168.1.2-192.168.1.226 -j MARK --set-mark $TAG_MARK
iptables -t mangle -A PREROUTING -i br0 -m iprange --src-range 192.168.1.228-192.168.1.254 -j MARK --set-mark $TAG_MARK