Droplet outgoing requests not passing IP whitelist checks

Posted September 3, 2021 244 views
PythonUbuntu 20.04DigitalOcean Droplets

I have two Ubuntu 20.04 droplets where I need to make requests that require the requests to come from whitelisted IPs. This is enforced by two separate external APIs (separate domains, companies, etc.), which have whitelisting restrictions. When I run the (Python) apps from my local machine, there’s no issue with passing the whitelist checks, however, the same requests fail from the droplets.

When I run a check with curl, the returned IP addresses agree to those in my Digital Ocean dashboard (which are used in the whitelists).

Any possibilities that jump out of why I might be having this issue on the droplets and not on my local machine?

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.

Submit an Answer
1 answer

Hi there,

If I get this correctly, it sounds like that the external APIs that you are using might be having some additional restrictions causing the problem for you.

What I would do personally is to get in touch with the external APIs provider and ask them to check why your IP addresses are not passing their whitelist check.

Let me know how it goes!