Reserve IP in OpenVPN
The IPs in the VPN are assigned randomly. If you have your router configured using something like Tomato, you can setup the reservation by MAC address. For the linux-based install, follow these steps:
1) To begin, first identify the directory, where the files will be stored:
2) Add the path to your /etc/openvpn/server.conf file:
3) Each client has to have it's own IP reservation. It is done based on CN from when each client was generated. Check your .cer or .crt file for a similar Subject line. In our case, the CN is client-connection
4) Edit the file (vim /etc/openvpn/reserved/client-connection) and add your IP (in our case it is 172.16.0.15):
ifconfig-push 172.16.0.15 255.255.255.0
#you can also optionally push the gateway, if you want the traffic to go through VPN. Uncomment below and replace as needed
#push "route 172.16.0.0 255.255.255.0 172.16.0.1"
and you are done.