Report this

What is the reason for this report?

How to directly access the server with a port without doing any reverse proxying?

Posted on June 26, 2018

hi i’m new to this, when i’m running my application, i can’t access my application with public ip and the port number, but i can successfully access after reverse proxying with nginx, how could i directly access the app?



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.

It could be that there is a firewall blocking external connections via that specific port, here are some ways to debug:

First - confirm that the port is definitely blocked externally by running telnet YOUR_IP_ADDRESS THE_PORT_NUMBER from the command line. For example: telnet 123.45.123.32 80 if you get a response:

Trying 123.45.123.32...
Connected to123.45.123.32.
Escape character is '^]'.

then the port is actually open and the problem might be on your local device.

Still not solved? Check if it is a software firewall, running on your Droplet:

  • UFW is a commonly used firewall control software, to check if it is running, run sudo ufw status verbose (full reference here)
  • IP Tables are the more complicated underlying functionality that UFW controls, if you run sudo iptables -nL you will see a list of any iptables rules that are blocking certain ports. If you just see:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

it means no ports are blocked.

Still not solved? Check if there’s a DigitalOcean cloud firewall blocking external connections: Go to your Droplet’s page in the Control Panel and click on the Networking tab. Are there any active firewall rules listed? Read more about Cloud Firewalls here

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.