Page 1 of 1

how to restrict?

Posted: Sun Apr 03, 2011 11:41 am
by arvpnick
hi, let us say i have two vps and lets name them server1 and server2 and an openvpn installed on each of them so that my clients have options where to connect whether in server1 or in server2.

i tried to generate the same username and password for my client in the two servers so that he will have a unique username and password for both servers.

my problem is i tried connecting to the two server using my two computers at the same time using the same password and username i generated and i was able to connect to the internet that is why what i want is, is there a way for me to restrict my client from connecting to the server at the same time in case he has two computers too?
thanks in advance.

Re: how to restrict?

Posted: Mon Apr 04, 2011 9:12 am
by maikcat
hi there,


you can block 2 users trying to connect concurrently if you are
using certificates by removing duplicate-cn statement from your server config..


Michael.

Re: how to restrict?

Posted: Mon Apr 04, 2011 10:19 am
by janjust
Michael,

this is the second thread this user opened on the subject; the previous thread died out because somebody gave a hint/pointer but apparently that wasn't enough.

As for the topic: restricting users to a single server (out of 2) is possible, but not trivial. You will need to synchronize the connected users between the two different servers. This can be done using a 'client-connect' script (and corresponding 'client-disconnect') . This script would then write out to a file or database, which is shared between both servers, that user X is connecting via Server 1 or 2; upon disconnection the entry is removed.
As stated, this is not trivial and will require some effort.