Lesson 4 | Determining which servers are listening |
Objective | Use netstat command to check what servers are listening for connection on machine. |
netstat
command is to determine what servers are listening for connections on your machine. Of particular interest are TCP and UDP[1] servers. You obtain this information using the -a
option to netstat
:
-u
option.
The -n
option means to use numeric addresses:host$ netstat –nua Active Internet connections (including servers) Proto Recv-Q Send-Q Local Address Foreign Address udp 0 0 0.0.0.0:753 0.0.0.0:* udp 0 0 0.0.0.0:514 0.0.0.0:* udp 0 0 0.0.0.0:111 0.0.0.0:* udp 0 0 0.0.0.0:37 0.0.0.0:* udp 0 0 127.0.0.1:53 0.0.0.0:* udp 0 0 131.193.178.198:53 0.0.0.0:* udp 0 0 0.0.0.0:53 0.0.0.0:* udp 0 0 0.0.0.0:635 0.0.0.0:* udp 0 0 0.0.0.0:2049 0.0.0.0:* udp 0 0 0.0.0.0:137 0.0.0.0:* udp 0 0 0.0.0.0:138 0.0.0.0:*
netstat -P udp
.