Fixed IP with OpenVPN

Now that I have an OpenVPN server running, I’d like to get a fixed IP from it so that I can put ACL in my LAN access.

OpenVPN can link a user’s certificate DN with an IP address. This way, a user connecting with his personnal certificate with always get the same IP address.

Edit the etc/server.conf file and uncomment (or add) the “client-config-dir ccd” line.
Create the ccd directory in the same directory where server.conf lies.
Create a file named from the certificate’s DN value and add the IP allocation command:

# vi ccd/jdoe

Restart your OpenVPN service.

That’s all folks!

Source: Openvpn with fixed ips

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.