Netstat to Troubleshoot
Sometimes we need to see if a computer is making the connections that we think it should be making. For those situations, netstat is there for us. There are any number of reasons why we would want to diagnose a connection. To ensure that a client is talking to a server, that is one big reason that I can see. In another case, if I have access, I like looking at a machine that I am scanning with nmap or some other tool when I am scanning it, it can be informative to see those connections pop open. If I was using netstat on a Linux machine then my command would probably look something like this:
sudo netstat -na -c | grep "192.168.0.2"
You would run this example on the computer that you were scanning. The IP address is the address of the host that you are scanning from, or the client that you want to make sure is connecting to the server. So what have you done here? First, you ran netstat, with a few options that provide detailed output, and tell it to run in a loop, checking for connections continuously. Read more