What's new

OpenVPN Client - for a specific host IP

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

phantomc

New Around Here
Hello,

I own a AC66U router with the RT-AC66U_3.0.0.4_266.23b merlin build flashed.

I was experimenting with OpenVPN client, and got it working perfectly.

My only problem is that once I setup OpenVPN client, all my devices connect to the internet through OpenVPN's server, however I want only some IP hosts to use OpenVPN client 1 whereas others use the default pppoe wan connection.

as an example: I would like 192.168.1.3 to use the default pppoe connection whereas 192.168.1.4 will connect according to the openvpn client 1 settings.

I tried to disable "Create NAT on tunnel" and "Redirect Internet traffic" however I could not advance as I had not created a static routing before.

Would this be possible, and how?

Thanks in advance
 
Suggestions

There are several ways that you can do this. Usually when you connect to the openvpn server for the commercially provided services the router automatically pulls the route and dns configuration from the server. You can use the

route-nopull

option in the openvpn configuration to prevent this. Then you would have to setup manual routes and routing rules to direct the addresses that you want to go over the vpn. For instance:

Code:
ip route default dev tun0 table 10
ip rule add from 192.168.1.3 table 10

This means that for device that uses the ip of 192.168.1.3 to lookup routing table 10 in order to get its routing information. It would then see that the default route is through the openvpn tunnel and get routed that way. There are a few more steps that need to be done but this is the general idea. Let me know if you need more help.
 
Last edited:

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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

Staff online

Top