Openvpn Fixed static ip for clients

When my cloud server connect to my openvpn server i need them to have the same ip addres. All the time this is so I can set up monitoring and alerts system. Internal DNS and puppet controll.

 

On the openvpn server ad this in you server.conf

client-config-dir /etc/openvpn/ccd

then create the folder /etc/openvpn/ccd

 

In that folder create an file and give it the file name as you user ore keys are called.
Im using only keys and if i created an key with named web1-tx (I use my openvpn client create script see other post)

Then I create the file web-tx in the ccd folder.
Put the ip you want the server to have in that file.

ifconfig-push 10.20.0.12

Restart you openvpn server and you are done.

 

 

 

Leave a Reply

%d bloggers like this: