Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 '14 at 19:17
@user2196728 It's something like this: ;duplicate-cn Is it enable or I should comment it? – Hamid FzM Feb 4 '14 at 20:04

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 '14 at 20:16
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 '14 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 '14 at 20:24
Is the same cert used on all the devices, at the same time? – codenoire Feb 4 '14 at 20:26
Yes same cert could connect multiple devices! – Hamid FzM Feb 4 '14 at 20:28

Your Answer


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.