Netstat is a command line utility that can be used to list out all the network (socket) connections on a system. It lists out all the tcp, udp socket connections and the unix socket connections. Apart from connected sockets it can also list listening sockets that are waiting for incoming connections. So by verifying an open port 80 you can confirm if a web server is running on the system or not. This makes it a very useful tool for network and system administrators. So in this tutorial we shall be checking out few examples of how to use netstat to find information about network connections and open ports on a system. Here is a quick intro to netstat from the man pages netstat – Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships 1. List out all connections The first and most simple command is to list out all the current connections. Simply run the netstat command with the a option. $ netstat -a Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp …
nn Read full post here
10 basic examples of linux netstat command