How to make a request from a different IP?

I have a droplet running an app that needs to make requests to an external API. I want this droplet to be able to make requests using a different IP.

Someone suggested buying a droplet, turning it off and using its IP. Is that possible? Can someone point me to some resources that explain how to do it? In case it’s relevant, I’m using Nginx, Node.js and Ubuntu.

Another naive implementation would be sending a request from the main app to a dummy droplet then have that droplet make the request to the external API.

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Accepted Answer

Unfortunately, that would be considered IP spoofing and isn’t really ever needed in normal technical operations.

That being said, it would be possible to send requests to an external API with a different IP address without IP spoofing, by using a VPN or, more likely, a proxy service.

There are many free proxy services which you can google.

There are lots of very cheap VPN services as well. NordVPN is one.

You could also create another droplet in a different location and setup a VPN/proxy on that.

As far as getting your app to run through the proxy or VPN, it would depend on what framework/stack your app uses. I will assume you’re using nodejs for sake of argument.

Something like this would allow you to create outgoing requests through a proxy:

There we go, a proxy is what I’m trying to use. And yes, as I mentioned, I use Node.


Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel