17 Jul 2008, 16:15

OpenVPN: Static IP Assignments


OpenVPN is a great VPN solution: Easy to use, flexible and stable. But it lacks documentation. When trying to assign static ip adresses to my VPN clients I felt a bit lost. The solution is to create a directory inside the OpenVPN configuration directory and put the client-dependent configuration snippets there. Lets assume this directory is called “ccd” for “Client Configuration Directory”. Then you need to add the line “client-config-dir ccd” to your server.conf.

Inside the ccd you create one file for each client you want to configure and call the file exactly as the common name from the clients certificate. In this files you can use ordinary OpenVPN configuration statements. For assigning fixed IPs you would use “ipconfig-push 10.8.0.X” if you use the suggested subnet of “”.