I used this tutorial to setup an OpenVPN server on a Debian droplet: https://github.com/Nyr/openvpn-install I’ve also added a floating IP to the droplet, and now I’d like all connections to the VPN to appear as if they are coming from the floating IP, and NOT the primary IP of the server
When SSHing into the server, I managed to use the floating IP with a curl call:
curl --interface [ACNHOR-IP] https://api.ipify.org/
This worked - it gave the floating IP as response
How can it be done?
I saw this tutorial, but not sure what are the correct values, since the netstat -anr
doesn’t give a similar output (I have only one record: eth0
)
Thanks in advance
This textbox defaults to using Markdown to format your 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.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
I managed to get both incoming connection and outgoing to occur via the floating ip. In /etc/openvpn/server.conf i added a line
local floating-local-ip(10.19.0.6)
after which i restarted openvpn withservice openvpn restart
. After that i have removed/added some iptables rules like below:In my user.ovpn i have replaced
remote droplet-ip 1194
withremote floating-ip 1194
All of the above was on a clean Ubuntu 18.04 install.
This is the answer you are looking for: https://blog.programster.org/openvpn-digitalocean-ip-alias
Heya,
Maybe this will help you with your task.