Multiple OpenVPN clients on the same host

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
yuripod
OpenVpn Newbie
Posts: 4
Joined: Mon Oct 19, 2015 11:33 am

Multiple OpenVPN clients on the same host

Post by yuripod » Mon Oct 19, 2015 11:47 am

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?

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Multiple OpenVPN clients on the same host

Post by Traffic » Mon Oct 19, 2015 1:54 pm

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)

yuripod
OpenVpn Newbie
Posts: 4
Joined: Mon Oct 19, 2015 11:33 am

Re: Multiple OpenVPN clients on the same host

Post by yuripod » Tue Oct 20, 2015 7:52 am

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.

yuripod
OpenVpn Newbie
Posts: 4
Joined: Mon Oct 19, 2015 11:33 am

Re: Multiple OpenVPN clients on the same host

Post by yuripod » Thu Oct 22, 2015 7:19 am

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?

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Multiple OpenVPN clients on the same host

Post by Traffic » Mon Nov 02, 2015 12:21 pm

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 ..

alexeypolo
OpenVpn Newbie
Posts: 2
Joined: Wed Jun 01, 2016 11:16 am

Re: Multiple OpenVPN clients on the same host

Post by alexeypolo » Sun Jun 26, 2016 12:02 pm

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.

Post Reply