How do I assign multiple dedicated IPs to my Openvpn server's clients?

Alex Aref asked:

I have a server (CentOS 8) with Openvpn 2.4 setup on it, and I want to assign dedicated IPs to each of my clients, so they always get the same dedicated IP each time they log in, How can I approach this?

Thanks in advance

My answer:

You can specify IP addresses per client in the ipp.txt file. The format of the file is a CSV that looks like this:


First is the client name. This will be the name of the client as given in its OpenVPN client certificate. Second is the IPv4 address, and third is the IPv6 address.

Your OpenVPN server configuration file should specify to use the ipp.txt file to store addresses. This is the default, but if you make a custom configuration file you should be sure to include it.

ifconfig-pool-persist ipp.txt

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.