Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Any OpenWRT expert? (or route expert)
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Any OpenWRT expert? (or route expert)

netomxnetomx Moderator, Veteran

I'm trying to have 2 separate WiFis for 2 OpenVPN connections, but I have problems with the routes. I want that everything in the 192.168.11.x place goes to certain vpn, and the 192.168.10.x goes to another one.

Anyone got a similar experience? Thanks

Comments

  • so you are trying to do source based routing?

    Thanked by 1netomx
  • rds100rds100 Member
    edited April 2014

    ip rule add from 192.168.10.0/24 lookup 10 priority 100
    ip rule add from 192.168.11.0/24 lookup 20 priority 200
    ip route add default via x.x.x.x dev tun0 table 10 #assuming x.x.x.x is the gateway for the first OpenVPN
    ip route add default via y.y.y.y. dev tun1 table 20 #gateway for the second VPN

    edit: i've no idea about OpenWRT but if it's basicly linux - this should work.

    Thanked by 1netomx
  • netomxnetomx Moderator, Veteran

    @rds100 said:
    ip rule add from 192.168.10.0/24 lookup 10 priority 100
    ip rule add from 192.168.11.0/24 lookup 20 priority 200
    ip route add default via x.x.x.x dev tun0 table 10 #assuming x.x.x.x is the gateway for the first OpenVPN
    ip route add default via y.y.y.y. dev tun1 table 20 #gateway for the second VPN

    edit: i've no idea about OpenWRT but if it's basicly linux - this should work.

    this looks about right - will try. Thanks!

  • netomxnetomx Moderator, Veteran

    Well, I lost the connection to the router, I'll keep digging :)

Sign In or Register to comment.