Ubuntu open port problem!

Local virtual machine, ubuntu16.4, uses the following command to open the port

sudo iptables-I INPUT-p tcp-- dport 9000-j ACCEPT

then use netstat-an | grep 9000 check that the port is not open

Jan.21,2022

the port allowed by iptables and whether a program occupies / listens on this port are two different things.
netstat can only show the port on which a program is using or listening

Menu