By nevessmichel
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?
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!
Hi there @nevessmichel,
This actually looks all correct, so I think that it might be your local network closing the connections to that custom port. In order to do that you could run the following command from your computer:
- telnet portquiz.net 9000
If you are not able to connect then this would indicate that port 9000 is closed on your local network.
Let me know how it goes! Regards, Bobby
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.