I am trying to work out how to assign my various OpenVPN clients static IPs every time they connect.
I have found multiple posts explaining how to do it when OpenVPN is on a PC, but not when it is on a DD-WRT based router.
I understand it will involve adding information to my server config and also to my routers start up commands. I just don't know what I should be adding.
Any advice would be greatly received
Best Answer
CCD is an overkill for simple task like assign statc IP. (Looking from sysadmin point of view, excuse me :)
Source: man openvpn
--ifconfig-pool-persist file [seconds] Persist/unpersist ifconfig-pool data to file, at seconds intervals (default=600), as well as on program startup and shutdown.
The goal of this option is to provide a long-term association between clients (denoted by their common name) and the virtual IP address assigned to them from the ifconfig-pool. Maintaining a long-term association is good for clients because it allows them to effectively use the --persist-tun option.
file is a comma-delimited ASCII file, formatted as <Common-Name>,IP-address>.
If seconds = 0, file will be treated as read-only. This is useful if you would like to treat file as a configuration file.
Source: https://openvpn.net/archive/openvpn-users/2006-05/msg00316.html