Kyron Kyron - 1 year ago 201
Linux Question

Multiple OpenVPN Connections to Different Ports

I have done research into this, however, I don't really understand how I can accomplish this.

OpenVPN FAQ Regarding this Topic:

My goal is to connect to multiple servers/have multiple connections to a server, using OpenVPN. (Specifically, using Python 3.4.)

For example, I would like to connect to a server -, which uses the TCP protocol 443. In order to use multiple connections, I would need to bind it to a port, e.g. 9537. Now, for the other connection, I would like to connect to, which uses the same protocol. I would need to bind it to a different port, e.g. 9538.


Now, How would I do this? (Please give examples in Python [Any version, I can port] if you can. Or, pseudo-code that I can work from..)
I'm not really sure what the whole, TUN/TAP driver thing is, how to create another driver... It's confusing. So anybody that could help, it would be greatly appreciated.

Answer Source

Just put one .ovpn file for each connection inside openvpn's config/ directory.

When you start openvpn (without specifying --config), it will read all of them and create a connection for each one.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download