1

I have this directive in the server.cfg which assigns a range of ips for connecting users:

server 10.8.0.0 255.255.255.0

Each time I connect a client it always (if he's the first in line) gets 10.8.0.4 or .5 (since the server reserves 10.8.0.1 for itself).

What I want to do is to assign a random ip to my clients from the range I have created via the server config not just next ip for next client the way openvpn does it right now. Is there something I can do to achieve this?

1
  • Just out of curiosity: Why would you want that? Aug 4 '13 at 21:56
2

You can use client configuration files in the /etc/openvpn/ccd sub-directory. After the client authenticates, openvpn will open a configuration file which matches the uses common name if it exists. Add the configuration to push the fixed IP address in this file. Enure the user OpenVPN runs as after dropping privileges can read the directory and file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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