Question

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

Posted February 19, 2020 951 views
Applications

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)

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.

×
2 answers

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

https://www.digitalocean.com/community/tutorials/how-to-use-nmap-to-scan-for-open-ports-on-your-vps

Let me know how it goes.

Regards,
Alex

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.

Submit an Answer