Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How can I limit a client maximum connection in OpenVPN? What I really want is to restrict more than one device using one client account? How can I do that? Is it even possible? I've seen in OpenVPN Access Server such thing.

share|improve this question
    
Do you use directive duplicate-cn in your server.conf ? If yes, comment it out and you should not be able to have more than one connexion for a given client account. –  krisFR Feb 4 at 19:17
    
@user2196728 It's something like this: ;duplicate-cn Is it enable or I should comment it? –  Hamid FzM Feb 4 at 20:04

1 Answer 1

You have to

  1. Generate a new cert for each client
  2. NOT use the duplicate-cn directive

If you do this, then a client can't ever have more than one session at the same time.

share|improve this answer
    
I know I generate new cert for each client but what is difference between ;duplicate-cn and duplicate-cn? –  Hamid FzM Feb 4 at 20:16
1  
The first one with the ";" means that duplicate-cn is turned off. The other means that it's turned on. The ";" is a comment character, meaning ignore the line in the file. –  codenoire Feb 4 at 20:18
    
But in my server config file it was commented like first one but stil one user can connect with multiple devices! –  Hamid FzM Feb 4 at 20:24
    
Is the same cert used on all the devices, at the same time? –  codenoire Feb 4 at 20:26
    
Yes same cert could connect multiple devices! –  Hamid FzM Feb 4 at 20:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.