How to use floating IP as OpenVPN origin IP on Ubuntu 16.04?

I am configuring an OpenVPN server on a DigitalOcean droplet. I have assigned a Floating IP and would like the server to yield it as the origin IP. Right now, if I connect through the VPN and go to, the origin IP shows the anchor IP, not the floating IP. How do I change this?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


How was the VPN setup? Did you use an auto-installer or perform the setup by hand?

If the VPN was setup using an auto-installer, the vast majority of the time they are configured to use the primary IP of the server. Even if you can connect using your floating IP, the origin will still be the primary.

To change the IP that your VPN actually uses for connection, you’d need to find out where the config file(s) is/are for your setup and scan for the IP that was set for use. You would them replace any/all instances of the primary IP with the Floating IP.

That being said, if you’re only running a single VPN instance, you don’t really need a Floating IP. They are really meant to simplify load balanced solutions, not act as a secondary IP for the Droplet. I’m not entirely sure what you’re setting up, just making a general note as to what they are actually designed for versus what I’m reading over :-).