Who is connecting to my computer ? Why is my PC suddenly transferring so much data ? Where is it sending the data to ? Are there some zombie process or spyware running in the background that's actively making connections to the internet without my knowledge ? Why did my internet connection get so slow ?
If you are connected to the internet and any of the above questions trouble your mind, all you need to do is learn Netstat [network statistics], a hidden DOS Command that helps you keep an eye on your internet and network connections (both incoming and outgoing)
You can run the netstat command from directly from DOS command prompt window. We will not go into any technical details but directly jump to practical examples of using the Netstat command in real world situations:
How do I know who is connecting to my computer from the internet ?
netstat -p TCP
To display a list of external machines (IP address or Machine names with Port Number) that your computer is connnected to. If you wish to display the foreign address only in numeric form, append the -n switch.
I think a virus or trojan on my computer is sending data to the internet ? Can I confirm this
netstat -e 10
This command displays the number of bytes sent and received in real time. The command loops after every 10 seconds to give you an idea of how much data is being transferred and at what rate. If you are not transferring a file over the internet but still large data is being sent across, that signals a problem.
Which program(s) on my computer are making active connections to the internet ?
netstat -p TCP -b
This command displays the list of software executable (like Firefox.exe) that are connecting to the internet. It will also show which websites (or IP address) they are connecting to and what is the status of the connection.
ESTABLISHED - Both hosts are connected.
CLOSING - The remote host has agreed to close its connection.
LISTENING - Your computer is waiting to handle an incoming connection.
I am downloading an illegal file over a torrent network. Will others come to know about my activity ?
Absolutely, they can run the netstat command on their own machines and your computer's IP address would appear in the command's output. Any IP address can be easily traced to a physical geographic location of the computer with a little help from the ISP.
I have subscribed to a fast broadband internet connection but the data transfer rate sometimes drops down to 0 kbps. Why ?
Run the netstat command with the -b switch and look for values under the column "state" - If you see a lot of active connections with TIMED_WAIT status, that may be holding down the speed of your internet transfer. Kill the culprit process(es) from the Task manager or if it's an essential process, restart the computer.
To learn more about the netstat command, type netstat /? at the command prompt to see a detailed help page.