YazFi VPN redirect with VPN Director Only Issue/Multiple VPNS

drewski22785

Occasional Visitor
Goal: Automatic failover between multiple VPN's through the use of Guest Wifi

The YazFi addon has been great and works perfect with a single VPN, or manual failover of a vpn connection. I am trying to accomplish automatic failover type of scenario between two vpn's I have built.

Merlin Code: 386.3.2
YazFi: 4.3.4
VPN Client: Redirect internet via VPN Director

Attempt 1: remove vpn director entries created by yazfi addon and add new entries pointing to both vpn's. Left YazFi setting Redirect all to vpn: yes
Result: When vpn failed that was configured in YazFi all internet connectivity lost

Attempt 2: Disable redirect all to vpn in Yazfi, add entries in vpn director for both vpn's
Result: No internet whether both or 1 vpn on

Attempt 3: Disable redirect all to vpn in Yazfi, Enable Two-way to guest, add entries in vpn director for both vpn's
Result: This appeared to work initially, I had internet with either vpn active with the correct ip when switching vpn's etc... The problem occurred after about 15 mins, internet stopped working. Had to enable and disable all the options above to get it working again. After about 15 mins it stopped working again.

Is it possible to redirect guest traffic using vpn director only like I am trying in order to take advantage of multiple vpns?

Any help is greatly appreciated!
 

drewski22785

Occasional Visitor
Okay so I edited the script to get this to work in two parts and kind of a Hack Job but here is what I have.

Without getting into custom variables or trying to change the Menu, I decided that if the VPN NO is set to 5 it would apply the following:

Under Function Conf_Validate()

if [ "$(eval echo '$'"${IFACETMP}_VPNCLIENTNUMBER")" -eq 5 ]; then
echo "VPN Client $(eval echo '$'"${IFACETMP}_VPNCLIENTNUMBER") is MULTI-VPN NOT, enabling it..."
else
Print_Output false "VPN Client $(eval echo '$'"${IFACETMP}_VPNCLIENTNUMBER") is not configured for Policy Routing, enabling it..." "$WARN"
nvram set vpn_client"$(eval echo '$'"${IFACETMP}_VPNCLIENTNUMBER")"_rgw=2
nvram commit
fi

Under Function Config_Networks()

if [ "$(Firmware_Version_Check "$(nvram get buildno)")" -lt "$(Firmware_Version_Check 386.3)" ]; then

Routing_NVRAM create "$IFACE" "$VPNCLIENTNO" 2>/dev/null
Firewall_NAT create "$IFACE" "$VPNCLIENTNO" 2>/dev/null
else
if [ "$VPNCLIENTNO" -eq 5 ]; then
Routing_VPNDirector delete "$IFACE" 2>/dev/null
Firewall_NAT create "$IFACE" "1" 2>/dev/null
Firewall_NAT create "$IFACE" "2" 2>/dev/null
Firewall_NAT create "$IFACE" "3" 2>/dev/null
Firewall_NAT create "$IFACE" "4" 2>/dev/null
else
Routing_VPNDirector create "$IFACE" "$VPNCLIENTNO" 2>/dev/null
Firewall_NAT create "$IFACE" "$VPNCLIENTNO" 2>/dev/null
fi
fi
# Firewall_NAT create "$IFACE" "$VPNCLIENTNO" 2>/dev/null
else



I would prefer to add a customer variable under settings or what not but not sure if that would break other parts of the script. This allows you to use VPN director for policy routing your Guest Traffic at min.
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top