Showing posts with label Netstat. Show all posts
Showing posts with label Netstat. Show all posts

Detecting Listening Network Ports

0 comments
One of the most important tasks is to detect and close network ports that are not needed.

To get a list of listening network ports (TCP and UDP sockets), you can run the following command:

# netstat -tulp

Running a port scan from another server. (make sure that you have permissions to probe a machine):

# nmap -sTU

Verify that port is open

121 comments

Run following command:


(1)netstat -tulpn | less or


(2)netstat -lntp | grep :21 (put any port)
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 23054/vsftpd


(3)netstat -lnp | grep '0.0.0.0:80'


(4)netstat -lnp | grep 'exim'
tcp 0 0 0.0.0.0:465 0.0.0.0:* LISTEN 22105/exim
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 22097/exim
tcp 0 0 0.0.0.0:26 0.0.0.0:* LISTEN 22091/exim