Page 1 of 1

Multiple OpenVPN clients on the same host

Posted: Mon Oct 19, 2015 11:47 am
by yuripod
I am working with OpenVPN in OpenWRT. I need to create multiple OpenVPN clients connected to the same VPN server. All clients shall work simultaneously.
Is it possible? If yes - what are the main steps of multiple clients setup?

Re: Multiple OpenVPN clients on the same host

Posted: Mon Oct 19, 2015 1:54 pm
by Traffic
OpenVPN on OpenWRT supports --server therefore supports multiple clients.

Protip: Use google "site:" feature to search this forum for answers.

eg .. into google:

Code: Select all

site:forums.openvpn.net openwrt
You can also use HOWTO: For OpenVPN Community Edition and create a custom server config in OpenWRT which uses standard openvpn directives (there maybe some incosistencies in OpenWRT which we do not support)

Re: Multiple OpenVPN clients on the same host

Posted: Tue Oct 20, 2015 7:52 am
by yuripod
In my application there are two hosts. On one host I have to run multiple VPN clients, each one associated with its interface. The VPN server will run on another host. All VPN clients on the 1-st will have to be connected to the same VPN server on the second host.
Of course I looked at all relevant documentation sources like HOWTO etc, but I couldn't find the clear instructions how to setup it and even if it is possible at all.

Re: Multiple OpenVPN clients on the same host

Posted: Thu Oct 22, 2015 7:19 am
by yuripod
My problem is that I have to have multiple OpenVPN clients on the same host to be connected to the same VPN server. That is if I open ifconfig I am supposed to see virtual interfaces tun0, tun1 etc. Each interface shall be associated with its physical interface. Is this supported by OpenVPN?

Re: Multiple OpenVPN clients on the same host

Posted: Mon Nov 02, 2015 12:21 pm
by Traffic
What you appear to propose is:
  • Host 1: Openvpn Server / 1 Server instance
    • Openvpn Server @ 10.8.0.1 (example)
  • Host 2: OpenVPN Client / Multiple Client instances
    • Openvpn Client 1 @ 10.8.0.11 (examples)
      Openvpn Client 2 @ 10.8.0.21
      Openvpn Client 3 @ 10.8.0.31
      etc
This is possible ..

Re: Multiple OpenVPN clients on the same host

Posted: Sun Jun 26, 2016 12:02 pm
by alexeypolo
You can use network namespaces, each VPN client will run in a separate network namespace. As a result, all clients can have identical IP addresses, because they are separated by network namespaces.