Could not access to my application in digital ocean through public IP?

Hi, I faced an issue regarding the ufw ubuntu firewall rule in digital ocean, I already allow the port in in from anywhere but still I can not access to my application with public ip with the port that I allowed. How to allow the ufw firewall rule for my application in secure ways. Thank you. Event I try to disable the ufw from ubuntu, still I can not access my application through public IP address.

Rule: To Action From

22 ALLOW Anywhere 8080 ALLOW Anywhere 3000 ALLOW Anywhere 27017/tcp ALLOW Anywhere 22 (v6) ALLOW Anywhere (v6) 8080 (v6) ALLOW Anywhere (v6) 3000 (v6) ALLOW Anywhere (v6) 27017/tcp (v6) ALLOW Anywhere (v6)

Show comments

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @jonhzono,

Have you figured out the issue? I’m running through the same problem. I tried:

  1. completely disabling ufw
  2. ensuring that apache is running on all interfaces and corresponding ports
  3. made sure /etc/hosts is config’d correctly.

Still no go. I get curl: (7) Failed to connect to 104.***.**.160 port 443: Connection refused when I’m on the same machine. But works from outside.

Hello, @jonhzono

Could you also please make sure that your application is running/listening on the port as well? You can check this using netstat:

netstat -plunta | grep PORT

If UFW is disabled and you still can’t access your application then it might be something else that is preventing you from loading your application.

If you can see that the service is up and running on the specified port then you can check if the service is also visible from outside the droplet by using nmap:

nmap -PN DropletIP

Let me know how it goes.

Regards, Alex