Report this

What is the reason for this report?

Cannot connect to app externally

Posted on May 17, 2020

I have a python app running at port 9000 and want to connect externally. So, I open port 9000 in ufw, checked wheather port app is listen and created rule at Digital Ocean firewall. I can connect to postgres at port 5432 and ssh, but cannot connect to port 9000.

sudo netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      692/systemd-resolve
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      877/sshd
tcp        0      0 0.0.0.0:5432            0.0.0.0:*               LISTEN      937/postgres
tcp        0      0 0.0.0.0:9000            0.0.0.0:*               LISTEN      1184/python3.6
tcp6       0      0 :::22                   :::*                    LISTEN      877/sshd
tcp6       0      0 :::5432                 :::*                    LISTEN      937/postgres
sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
9000/tcp                   ALLOW       Anywhere
9001/tcp                   ALLOW       Anywhere
10001/tcp                  ALLOW       Anywhere
10000/tcp                  ALLOW       Anywhere
5432/tcp                   ALLOW       Anywhere
22/tcp                     ALLOW       Anywhere
22                         ALLOW       Anywhere
9000/tcp (v6)              ALLOW       Anywhere (v6)
9001/tcp (v6)              ALLOW       Anywhere (v6)
10001/tcp (v6)             ALLOW       Anywhere (v6)
10000/tcp (v6)             ALLOW       Anywhere (v6)
5432/tcp (v6)              ALLOW       Anywhere (v6)
22/tcp (v6)                ALLOW       Anywhere (v6)
22 (v6)                    ALLOW       Anywhere (v6)

Print of Droplet Firewall

Can someone help me, please?

The developer cloud

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

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.