Question
Cannot connect to app externally
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)
Can someone help me, please?
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.
×