I about to deploy a server to DO but I have a concern that I thought I should address before I do. My server will not have a domain name because I’m going to be sending HTTP requests to it from a mobile application using it’s IP. My question is, is this do-able? Does DO allow sending requests to droplets using their IP/port or do I have to mess around with the firewall and opening ports etc?
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.
@mustard
Droplet’s are essentially VPS’s, which means they’ll function however you set them up. You can setup the web server or backend (of your choice) to accept requests via IP, or you can use a domain. It just depends on what you need. There’s really no limitation there :-).
In terms of using a firewall, it is recommended as the IP’s are public and therefore open to the public. That means that without a firewall running and limiting what ports a visitor can connect to, they could potentially attempt to connect on any port.
Ideally, I setup
ufw
in the following manor:Disable the Firewall
Reset the Firewall
Deny All Incoming Requests
Allow All Outgoing Requests
Now, we’ll only allow in a select few ports – 22 (SSH), 80 (HTTP), and 443 (HTTPS).
With
ufw
now setup, we’ll turn it on.Now the only ports that anyone is allowed to connect on are 22, 80, and 443. The rest will be denied.
Hi @mustard
Technically there is no difference between having requests going to a domain or not - from DigitalOcean’ point. So yes, DO allows this.
But from long experience, please don’t do this. If you suddenly want to move to another server or do anything where you loose the IP, then you need to create a new mobile application and push that to every device. Use (sub)domains, that way you can modify the DNS and you won’t have to redo your mobile app.