Le 03/09/2023 à 08:48, Jason Long via Openvpn-users a écrit :
Hello,
When I use "server 10.8.0.0 255.255.255.0" in the Server.conf file, then 
OpenVPN assigns IP addresses to clients respectively. What should I do if I want to 
assign a specific IP address to a client with a specific computer name or MAC address?

What should you do? You should read the docs. Really.

Do your homework, Jason. Many questions you're asking here have a simple answer via "man" commands or by simply googling them. And this is typically one of them.

*$ man openvpn*

Excerpt:*
*

** --client-config-dirdir
             Specify  a  directory dir for custom client config files. After a connecting client has been authenticated, OpenVPN will              look in this directory for a file having the same name as the client's X509 common name. If a  matching  file  exists,  it              will  be  opened  and parsed for client-specific configuration options. If no matching file is found, OpenVPN will instead              try to open and parse a default file called "DEFAULT", which may be provided but is not required. Note that the configura‐              tion files must be readable by the OpenVPN process after it has dropped it's root privileges.

             This  file  can specify a fixed IP address for a given client using --ifconfig-push, as well as fixed subnets owned by the
             client using --iroute


If what you meant wasn't exactly that, and if you really want to use the name of the machine or its mac address instead of its common name, please provide more insight about why you would really want to do that. Asking questions out of the blue, without any perceivable goal, is a real deterrent.


Bruno
_______________________________________________
Openvpn-users mailing list
Openvpn-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-users

Reply via email to