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 at 6:49 AM.

  1. deepakv

    deepakv New Around Here

    Joined:
    Thursday
    Messages:
    2
    Hi,

    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 10.10.10.10 then go through wan and if from PCA destination is anything but 10.10.10.10 (so 0.0.0.0) then go through VPN.

    I have tried adding it in different orders but the i seems to use the 0.0.0.0 rule rather even if i go to ip address 10.10.10.10.
    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 Very Senior Member

    Joined:
    Jul 8, 2012
    Messages:
    1,931
    Location:
    UK

    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:
    Code:
    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 at 8:55 AM
  3. deepakv

    deepakv New Around Here

    Joined:
    Thursday
    Messages:
    2
    Thanks Martin will give it a go.