What's new

selective routing with two openvpn clients running

  • 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!

rostar99

Occasional Visitor
I would like to route certain ports to openvpn client 2 and certain IPs to openvpn client 1. Has anyone had any success selectively routing with two different openvpn clients running simultaneously?

Thanks in advance
 
I would like to route certain ports to openvpn client 2 and certain IPs to openvpn client 1. Has anyone had any success selectively routing with two different openvpn clients running simultaneously?

Thanks in advance

I normally run selective routing for OpenVPN Client 1 through HMA to USA.

I have just connected OpenVPN Client 2 through HMA to Asia, and manually entered:

Code:
ip route add default via 10.200.1.80 dev tun12 table 300
ip rule add fwmark 128 table 300

ip route
XXX.XXX.XXX.1 dev eth0  scope link
10.8.0.2 dev tun21  proto kernel  scope link  src 10.8.0.1
10.8.0.0/24 via 10.8.0.2 dev tun21
10.88.8.0/24 dev br0  proto kernel  scope link  src 10.88.8.1
XXX.XXX.XXX.0/22 dev eth0  proto kernel  scope link  src XXX.XXX.XXX.123
10.200.0.0/22 dev tun11  proto kernel  scope link  src 10.200.1.8
10.200.0.0/22 dev tun12  proto kernel  scope link  src 10.200.1.80
127.0.0.0/8 dev lo  scope link
default via 92.14.80.1 dev eth0

and when I tag my laptop to use route table 300

Code:
iptables -t mangle -A PREROUTING -i br0 -m iprange --src-range 10.88.8.115 -j MARK --set-mark 128

it routes traffic to Asia until I remove the PREROUTING entry (or set MARK=0)

I can't see why individual ports couldn't be selectively routed in this manner.


Regards,
 

Attachments

  • 06-03-2014 12-36-09.jpg
    06-03-2014 12-36-09.jpg
    52.2 KB · Views: 262
Can you specify the solution

I have just got selective routing to work on my AC66U by following the 'Selective Routing with Asuswrt-Merlin' thread.

And would like to introduce a second openvpn client. The code in the post above does not help me a lot. (I am very new to this scripting stuff)

Any help would be appreciated.

Thanks
 

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