What's new

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

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

deepakv

New Around Here
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.
 
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.


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:

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top