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
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
You can specify IP addresses per client in the ipp.txt
file. The format of the file is a CSV that looks like this:
dalaran,10.8.0.8,2001:db8:131d:c91f::1001
brill,10.8.0.12,2001:db8:131d:c91f::1002
theramore,10.8.0.16,2001:db8:131d:c91f::1003
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