Howto run multiple client connection using single daemon

How to customize and extend your OpenVPN installation.
Locked
tushar.sharma
OpenVPN Power User
Posts: 58
Joined: Fri Oct 07, 2011 12:23 pm
Location: Pune
Contact:

Howto run multiple client connection using single daemon

Post by tushar.sharma » Sat Jan 21, 2012 1:45 pm

Hello All,

I want to establish multiple tunnel i.e to run multiple client on single pc to connect to multiple
server.
Is it possible to run multiple client using single configuration file such that all client connect to
different server using single daemon only. ??
i can establish using multiple daemon say openvpn --config client1.ovpn
openvpn --config client2.ovpn

Thanking You,
Tushar

User avatar
Mimiko
Forum Team
Posts: 1568
Joined: Wed Sep 22, 2010 3:18 am

Re: Howto run multiple client connection using single daemon

Post by Mimiko » Wed Jan 25, 2012 7:48 pm

Put all the *.ovpn files for each connection under the config/ folder and run openvpn without --config parameter.

tushar.sharma
OpenVPN Power User
Posts: 58
Joined: Fri Oct 07, 2011 12:23 pm
Location: Pune
Contact:

Re: Howto run multiple client connection using single daemon

Post by tushar.sharma » Fri Jan 27, 2012 10:22 am

Thank You for reply Mimiko
But suppose two clients are running already,
now i want to run third client i need to again fire openvpn command,
so that will result into two daemon ?

Tushar

User avatar
Mimiko
Forum Team
Posts: 1568
Joined: Wed Sep 22, 2010 3:18 am

Re: Howto run multiple client connection using single daemon

Post by Mimiko » Fri Jan 27, 2012 10:40 am

You will have to restart OpenVPN daemon. When OpenVPN is started, the main thread reads any ovpn file it finds and start a different child processes for every ovpn file.

tushar.sharma
OpenVPN Power User
Posts: 58
Joined: Fri Oct 07, 2011 12:23 pm
Location: Pune
Contact:

Re: Howto run multiple client connection using single daemon

Post by tushar.sharma » Fri Jan 27, 2012 12:43 pm

But will not disturb ongoing connection i mean already established other connectionss ?

and can i use same port in all client connections running on same machine ?


Thanking You
Tushar

User avatar
Mimiko
Forum Team
Posts: 1568
Joined: Wed Sep 22, 2010 3:18 am

Re: Howto run multiple client connection using single daemon

Post by Mimiko » Fri Jan 27, 2012 1:24 pm

You can start openvpn manually with desired ovpn file. And a scheduled restart of the server to autostart all ovpn servers.

You can use same port on client connections as long as the clients connect to different servers.

tushar.sharma
OpenVPN Power User
Posts: 58
Joined: Fri Oct 07, 2011 12:23 pm
Location: Pune
Contact:

Re: Howto run multiple client connection using single daemon

Post by tushar.sharma » Mon Jan 30, 2012 1:13 pm

Dear Mimiko,

I got solution through openvpn channel on irc.

Thanks a lot for help
Thanking You,
Tushar

Locked