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

1 Answer 1


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
  • What if I don't have an IPv6 address?
    – Alex Aref
    Jun 16, 2020 at 15:01
  • Also as I read somewhere, I can't just buy dedicated IP addresses, so where can I possibly get them to assign each client his own static IP? thanks for answering
    – Alex Aref
    Jun 16, 2020 at 15:02
  • 1
    You should get IPv6, then. If your provider doesn't give it to you, you are using the wrong provider. And not providing IPv6 over your VPN will cause leakage. Jun 16, 2020 at 15:04
  • 10.8.0.* is like an internal IP address for the client to connect to the Server, But I meant to give them dedicated/static IP addresses so they can surf the internet with this static and unique IP,
    – Alex Aref
    Jun 16, 2020 at 18:06
  • 1
    @AlexAref You can do that too. Jun 16, 2020 at 19:43

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.