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!
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.
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!