aleyase2
By:
aleyase2

Cannot access a port remotely but it works locally

November 7, 2015 2.7k views
DigitalOcean Firewall Deployment Docker Networking

I want to access to 9000 port remotely.
This is the result for "sudo netstat -ntulp"

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN 986/mongod

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 982/sshd

tcp6 0 0 :::9000 :::* LISTEN 4978/docker-proxy
tcp6 0 0 :::12201 :::* LISTEN 4960/docker-proxy
tcp6 0 0 :::22 :::* LISTEN 982/sshd

udp6 0 0 :::12201 :::* 4970/docker-proxy

So the 9000 port should be accessible remotely.
It works locally (both http://localhost:9000 and http://[ip-address]:9000) but when I try to connect remotely (http://[ip-address]:9000) it doesn't work.
Also ufw is disabled.

Can anyone help?

1 comment
3 Answers

Same here..

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1498/sshd       
tcp6       0      0 :::8080                 :::*                    LISTEN      9268/node       
tcp6       0      0 :::22                   :::*                    LISTEN      1498/sshd  

but cant access 8080 at all. Even if I bind it to 0.0.0.0

it only works when I start it in docker and expose the ports.. then somehow I am able to connect to node running in docker. Anyone has idea what this could be?

Glad to hear it was a result of your own network configuration, and the problem is resolved.

I'm having the same problem, wondering if you remember what you did to solve this problem?

Trying to set up Grafana in Ubuntu, and when I run the same command I get

/var/log/grafana# sudo netstat -ntulp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1636/sshd
tcp6       0      0 :::22                   :::*                    LISTEN      1636/sshd
tcp6       0      0 :::3000                 :::*                    LISTEN      2964/grafana-server
  • Hi, could you solve the issue? I have the same problem with Grafana, I cant reach the server from remote pcs, but when I load the main page on the grafana server it works.

Have another answer? Share your knowledge.