Hope someone can help me, I have a LinkSys WRT1900 ACS v2 router on which i have installed LEDE. I have 2 vlans (126.96.36.199/24, 192.168.10.1/24), I have also OpenVPN setup and my goal was to have traffic from 1 vlan (.10.1) routed through VPN and traffic from the other vlan (.5.1) not go though VPN.
I have this working in so many words, but for the non vpn vlan to connect to the internet, i have had to add the following as a start up script
ip route add default via 192.168.0.1 table 10 ip rule add from 192.168.5.2 table 10 ip rule add from 192.168.5.3 table 10 ip....
The above works fine, one vlan goes via VPN and the other not through VPN, the only issue with this is that the moment i put the above code for each ip address and reboot my router for the changes to take affect, i can no longer ping between vlans, and i really would like to connect to devices locally on either vlan.
If i take out the table above, I dont get internet on non VPN VLAN, but can ping devices on both vlans locally.
if it helps, i have added some further info for you below.
OpenVPN Config File
client dev tun proto udp remote *****OMITTED***** resolv-retry infinite remote-random nobind tun-mtu 1500 tun-mtu-extra 32 mssfix 1450 persist-key persist-tun ping 15 ping-restart 0 ping-timer-rem reneg-sec 0 explicit-exit-notify 3 remote-cert-tls server #mute 10000 auth-user-pass secret comp-lzo verb 3 pull fast-io cipher AES-256-CBC auth SHA512 <ca> *****OMITTED***** </ca> key-direction 1 <tls-auth> # # 2048 bit OpenVPN static key # -----BEGIN OpenVPN Static key V1----- *****OMITTED***** </tls-auth>
Router IP Routing Table
root@LEDE:~# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 10.8.0.1 188.8.131.52 UG 0 0 0 tun0 default 192.168.0.1 0.0.0.0 UG 0 0 0 eth1.2 10.8.0.0 * 255.255.0.0 U 0 0 0 tun0 184.108.40.206 192.168.0.1 255.255.255.255 UGH 0 0 0 eth1.2 220.127.116.11 10.8.0.1 18.104.22.168 UG 0 0 0 tun0 192.168.0.0 * 255.255.255.0 U 0 0 0 eth1.2 192.168.0.1 * 255.255.255.255 UH 0 0 0 eth1.2 192.168.5.0 * 255.255.255.0 U 0 0 0 br-VLAN5 192.168.10.0 * 255.255.255.0 U 0 0 0 br-VLAN10 root@LEDE:~#
Any help would really be appreciated, and please take it easy on me as i am rather new to all this.