3

Good day

At my company, on windows machines, we have different client connections open with openvpn like this:

10.1.x.x for Eastern Europe
10.2.x.x for Middle East
10.3.x.x Cuba
10.4.x.x China

They are completely different servers in different locations with their own subnets and iptables rules, this because we have offices running in heavily censored places that need specific rules for each country.

In windows with Viscosity or OpenVpn Gui we just import the file in .ovpn format, or setup them manually, new tap interfaces are automatically created and that's it. All the connections are up and running with no problem.

Now we started using linux on some clients notebooks and I noticed I cannot run multiple istances of the vpn client like we do on windows, because when we connect to one of the mentioned subnets, automatically the other interface and relative connection is dropped.

Actually to setup vpn connections, I've tried installing the packages network-manager-openvpn and network-manager-openvpn-gnome on Debian and derivates.

I'm sure there is any setup I can do directly form the command line, enabling two tun interfaces like tun0 and tun1 and run them at the same time.

I've searched but found nothing so far, specifically for run multiple clients istances on linux.

Actually I've have no need to switch them on or off, or manage them form a gui, it is good to have them permanently enabled.

Thanks in advance.

  • Make sure your default route isn't being modified when you connect. You want the routes only for the remote addresses and that's all. There should be a setting to enforce this policy with openvpn but I'm not sure what it's called. – Matt Sep 15 '15 at 22:56
2

Debian-based systems should be able handle multiple VPN connections just fine. Just put the configs in /etc/openvpn/*.conf. If you haven't modified your /etc/default/openfile then the startup scripts will startup an instance of openvpn for each *.conf in this directory.

Of course this assumes that your various VPNs don't have conflicting routes or configuration that prevent each other from starting properly.

1

For me it looks like a known bug. What software versions are you using exactly?

You can run the openvpn client.conf manually, it will work!

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.