By jonhzono
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)
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!
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:
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.
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.