hbridges
By:
hbridges

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

January 25, 2017 566 views
VPN DNS 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 whatismyip.com, the origin IP shows the anchor IP, not the floating IP. How do I change this?

1 Answer

@hbridges

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 :-).

Have another answer? Share your knowledge.