RT-AC68U: How to setup SSID for VPN (paid VPN like PIA) and SSID for Regular ISP
Flash Tomato on to the router (FLASHING FIRMWARE IS AT YOUR OWN RISK)
http://tomato.groov.pl/download/K26ARM/
I used tomato-RT-AC68U-ARM--123-AIO-64K.trx
Upload and flash just using ASUSwrt GUI
You may have to reboot several times. If it still doesnt fire hold down WPS button and then power on. Keep holding the WPS button for 30 seconds until the power button rapidly blinks. Reboot.
In the tomato GUI:
Basic >Network
Create a second bridge br1. IP 192.168.2.1/24. Enable DHCP. Save.
Advanced >VLAN
VLAN #3 bridge to LAN1 (br1). Put at least one port (Port 4) on VLAN #3. Save.
Advanced >Virtual Wirless
Set guest wl0.1 (and wl1.1 for 5GHz) to LAN1(br1). Set security WPA2 and password. Save.
VPN Tunneling > OpenVPN Client >Client 1 >Basic
Enable Start with WAN. Enter your VPN details. Enable Create NAT on tunnel. Save.
VPN Tunneling > OpenVPN Client >Client 1 >Advanced
(EDIT) Accept DNS configuration :Strict. Save.
Admin >Scripts> WAN Up
Copy in the following script minus Spotify rules at bottom. Add* Save.
http://www.linksysinfo.org/index.ph...-ports-through-vpn-openvpn.37240/#post-205781
*iptables -t nat -I POSTROUTING -o tun11 --src 192.168.2.0/24 -j MASQUERADE
(EDIT) See post #3 for example.
Reboot & Done. The script simply creates a second table for non-VPN and directs there with a firewall mark.
Optional. You can add custom bash scripts in VPN> Custom Configuration box:
route-up /jffs/whatever.sh (dont forget chmod a+rx)
route-down /jffs/whatever.sh
Pretty easy to customise things like stopping DNS leaks on VPN (VPN DNS leaks to ISP but not really big deal**) or killing interface when VPN fails.
**iptables -t nat -A PREROUTING -i br0 -p udp --dport 53 -j DNAT --to $(nvram get wan_get_dns | awk -F' ' '{print $1}')
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 53 -j DNAT --to $(nvram get wan_get_dns | awk -F' ' '{print $1}')
======================
RT-AC68U: How to setup SSID for VPN1, SSID for VPN2 (paid VPNs like PIA with different exit locations) and SSID for Regular ISP
Basically the same as above except you must create 3 new routing tables (1 for each bridge/ssid) instead of just 1 new routing table.
Steps
Add another bridge interface, br2
Add another virtual wireless to br2
Add VPN Client 2 and enable start with WAN. The second tunnel is callled tun12.
Modify the above script for 3 tables. Call them whatever and give them 3 different fwmarks.
Reboot.
Running 3 separate SSID on 3 bridges works but is not very stable (for now..). I think the stability problem is with my up/down scripts and recreating routing tables when one of the VPNs fails. The VPNs mix up each others DNS' which I can't seem to control. Let me know if you have a better idea to stabilise 3 ssids.
Saffron
Flash Tomato on to the router (FLASHING FIRMWARE IS AT YOUR OWN RISK)
http://tomato.groov.pl/download/K26ARM/
I used tomato-RT-AC68U-ARM--123-AIO-64K.trx
Upload and flash just using ASUSwrt GUI
You may have to reboot several times. If it still doesnt fire hold down WPS button and then power on. Keep holding the WPS button for 30 seconds until the power button rapidly blinks. Reboot.
In the tomato GUI:
Basic >Network
Create a second bridge br1. IP 192.168.2.1/24. Enable DHCP. Save.
Advanced >VLAN
VLAN #3 bridge to LAN1 (br1). Put at least one port (Port 4) on VLAN #3. Save.
Advanced >Virtual Wirless
Set guest wl0.1 (and wl1.1 for 5GHz) to LAN1(br1). Set security WPA2 and password. Save.
VPN Tunneling > OpenVPN Client >Client 1 >Basic
Enable Start with WAN. Enter your VPN details. Enable Create NAT on tunnel. Save.
VPN Tunneling > OpenVPN Client >Client 1 >Advanced
(EDIT) Accept DNS configuration :Strict. Save.
Admin >Scripts> WAN Up
Copy in the following script minus Spotify rules at bottom. Add* Save.
http://www.linksysinfo.org/index.ph...-ports-through-vpn-openvpn.37240/#post-205781
*iptables -t nat -I POSTROUTING -o tun11 --src 192.168.2.0/24 -j MASQUERADE
(EDIT) See post #3 for example.
Reboot & Done. The script simply creates a second table for non-VPN and directs there with a firewall mark.
Optional. You can add custom bash scripts in VPN> Custom Configuration box:
route-up /jffs/whatever.sh (dont forget chmod a+rx)
route-down /jffs/whatever.sh
Pretty easy to customise things like stopping DNS leaks on VPN (VPN DNS leaks to ISP but not really big deal**) or killing interface when VPN fails.
**iptables -t nat -A PREROUTING -i br0 -p udp --dport 53 -j DNAT --to $(nvram get wan_get_dns | awk -F' ' '{print $1}')
iptables -t nat -A PREROUTING -i br0 -p tcp --dport 53 -j DNAT --to $(nvram get wan_get_dns | awk -F' ' '{print $1}')
======================
RT-AC68U: How to setup SSID for VPN1, SSID for VPN2 (paid VPNs like PIA with different exit locations) and SSID for Regular ISP
Basically the same as above except you must create 3 new routing tables (1 for each bridge/ssid) instead of just 1 new routing table.
Steps
Add another bridge interface, br2
Add another virtual wireless to br2
Add VPN Client 2 and enable start with WAN. The second tunnel is callled tun12.
Modify the above script for 3 tables. Call them whatever and give them 3 different fwmarks.
Reboot.
Running 3 separate SSID on 3 bridges works but is not very stable (for now..). I think the stability problem is with my up/down scripts and recreating routing tables when one of the VPNs fails. The VPNs mix up each others DNS' which I can't seem to control. Let me know if you have a better idea to stabilise 3 ssids.
Saffron
Last edited: