1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

rules for routing from one client to different interfaces based on destination IP address

Discussion in 'Asuswrt-Merlin' started by deepakv, Dec 7, 2018.

  1. deepakv

    deepakv New Around Here

    Dec 6, 2018

    What i am trying to achieve is using the openvpn client to direct traffic from the same source ip to a specific destination ip through the wan and all other to the vpn.
    eg, from PCA if destination is then go through wan and if from PCA destination is anything but (so then go through VPN.

    I have tried adding it in different orders but the i seems to use the rule rather even if i go to ip address
    I have also tried using policy rules and policy rules (strict)

    I have an asus ac68u running version 384.8.

    Am i trying to do something that it shouldn't be able to do or have i misunderstood it.

    Thanks for the help.
  2. Martineau

    Martineau Part of the Furniture

    Jul 8, 2012

    WAN rules take priority over VPN rules regardless of the order in which they appear in the Selective Routing table.

    You can check the RPDB rules by issuing:
    ip rule
    and can see the priority order in which the RPDB rules are applied.

    You should be able to achieve your desired selective routing using the GUI, otherwise you will need to exploit the openvpn event script vpn_clientX-route-up to create the WAN exception rule in the desired position in the RPDB table.

    NOTE: The GUI solution may involve using two VPN client connections.
    Last edited: Dec 7, 2018
  3. deepakv

    deepakv New Around Here

    Dec 6, 2018
    Thanks Martin will give it a go.