2

I am using an OpenVPN server I have no control over that has provided me with a client configuration to use. When I use the provided configuration, everything works as expected - all the network traffic on my local machine gets redirected through the VPN connection.

I want to figure out how to use the tunnel network interface without redirecting all traffic through it.

My setup

I have a software that performs a series of tasks and supports specifying the exact network interface to perform those tasks on. I want to be able to specify the tun01 OpenVPN interface on this software without affecting anything else on the machine.

Moreover, I need to be able to set up multiple VPNs over different network interfaces - tun01, tun02, tun03 etc. - so I can run my software doing simultaneous, separate tasks over each interface.

The problem

Right now I'm setting up all the separate network interfaces, but only the first OpenVPN to start up is actually working. My hunch is that the following OpenVPN clients I start are trying to tunnel through the first one instead of using my regular connection.

Basically, I need to either make the default state for my network to NOT tunnel through the OpenVPN so I can select the actual network interface I need to use manually, or find a way to make the OpenVPN client to ignore previous active VPN connections.

What I've tried already

My best attempt so far was to include pull-filter ignore redirect-gateway in my configuration file in hopes of not getting the routes installed and then using the tun01 interface directly, but when I tried doing that, the connection on my software did not use the VPN, instead using my regular connection.

1

My best attempt so far was to include pull-filter ignore redirect-gateway in my configuration file in hopes of not getting the routes installed and then using the tun01 interface directly, but when I tried doing that, the connection on my software did not use the VPN, instead using my regular connection.

Yes, what did you expect? The configuration you got uses pull, which pulls a default route (among other things). You blocked getting the default route, so your default route is not modified. If you don't want the default route the server sends, then you have to add routing entries for those addresses to want to direct to the VPN server.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.