Floating IP bind to anchor IP

August 1, 2019 168 views
DigitalOcean Firewall Git DigitalOcean Cloud Firewalls Ubuntu 18.04

I have Floating IP attached to droplet and its working fine in all case except git.
I have bitbucket local server (repository only accessible within internal network) If I white list droplet IPv4 to access in droplet git works fine and I am able to clone but if white list Floating IP and try to access repository via Floating IP it gives the following error
fatal: unable to access ’<<url>>’: Failed to connect to <<url>> port 7990: Connection timed out.

2 Answers

Hello, arhan

Is port 7990 open at both ends (TCP - Incoming and Outgoing)
.
You can also run a traceroute or mtr to the the floating IP address and see if you’re able to connect. As I can see you’re trying to connect on a specific port, you would need to specify the port as well.

traceroute floating.ip.address 7990

Let me know how it goes.

Alex

  • Hi Alex, thanks for your response.

    Yes port 7990 open from digital ocean firewall for both (TCP - Incoming and Outgoing)

    It comes to my knowledge recently that DO floating IP is default for Incoming traffic only.

    Can you suggest best approach to use floating IP for Outgoing traffic? right now I am using droplets IPv4 and its resolves git & another issue i was facing for mongodb replica set heartbeat failure. Both cases block outgoing traffic over floating IP.

Hi,

Jumping in here. Just to be clear, based on your last comment, it seems you are trying to connect from your droplet to an external service, using the floating IP address. While true the floating IP is designed to work by default for inbound traffic, it is possible to use it for outgoing traffic if your software supports selecting a specific interface.

I dug around a little and found this older question and answer (plus some good comments on top of that) about doing exactly this:

https://www.digitalocean.com/community/questions/send-outbound-traffic-over-floating-ip

One other note, if you have an older droplet (2015 or earlier) you may need to take additional steps to get this working.

Hope this helps and good luck! let us know how it goes

Have another answer? Share your knowledge.