Change IP address

October 29, 2018 2.2k views
IPv6 API Ubuntu 16.04 Ubuntu 18.04

First of all I’ve added a floating IP to my droplet.

This is my problem;

In one application I need to call an API. This API needs to know which IP address it can expect to be called from so I need to type my IP address in some window related to the API (register my ip addresses at the developer of the API). I have typed in both of my IP addresses: original anchor IP and new Floating IP

The problem is that the API does not recognize the floating IP - that is, if I delete the original anchor IP in the API window/register list then API does not work.

Can I somehow make the API see/accept my floating IP? Can I define this in some configuration file on the droplet?


This is my /etc/network/interfaces

The loopback network interface

auto lo
iface lo inet loopback

The primary network interface

auto eth0 eth1
iface eth0 inet static
address 138.68.64.119
netmask 255.255.240.0
gateway 138.68.64.1
up ip addr add 10.19.0.5/16 dev eth0
dns-nameservers 8.8.8.8 8.8.4.4
iface eth1 inet static
address 10.135.11.121
netmask 255.255.0.0

1 Answer

Hey friend,

The floating IPs were designed to pass input, but not to send data out from. If you inform the other side to expect to receive data from your droplet IP, I believe that should meet your requirements by default as the traffic would go out from that.

Jarland

Have another answer? Share your knowledge.