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.
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!
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. https://nordvpn.com/home-page/
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: http://codingmiles.com/node-js-making-https-request-via-proxy/
There we go, a proxy is what I’m trying to use. And yes, as I mentioned, I use Node.
Thanks!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.