All Windows systems have implemented native tool allowing us to monitor current network connections as well as control what ports we have currently opened and what applications are listening on each port. We can use this simple tool for various purposes such as network connection troubleshooting, trojan and other backdoor application detection and security audits.

In this tutorial I will show you how to use netstat to monitor your current connections and how to make simple batch job to perform this monitoring task online. 

First of all lets have a look what sort of options are offered by netstat:

1. Go to menu Start>Run, type in cmd and press Enter or just press WINDOWS+R, type in cmd and press Enter.
2. Command prompt should pop up on your screen and next type in netstat /? and press Enter.

netstat's options
 Pic. 01.

To check what ports are open we will use command: netstat -a -n which shows us all open TCP and UDP ports. Some of this ports may be at established state that means there is already connection established to the remote host or may be at listening state which means that port is currently open and there is an application listening for incoming connections.

checking port's states by netstat
 Pic. 02.

In this case we can simply troubleshoot network connections for example: if we have DNS server running on our host but client machines cannot obtain DNS answers for their request, we can check if port 53 is opened and is at listening state by issuing netstat -a -n command. In this way we may check if there are any other ports open which could sugges that we have got some unwanted software installed such as trojan horses, key loggers or other backdoor applications.

To find out what application is listening on each port we can use netstat -b -v -n command. In this way netstat shows us what executables are involved in creating each connection.

checking connection executables by netstat
 Pic. 03.

All commands above certainly shows us connection state at the time they have been issued. To perform simple online monitor which shows us connection state by probing port's states every second we can create very simple batch job script:

1. In command prompt type in: edit netstatmon.bat and press Enter.
2. Now we should be in editor's window with blue background, please input such batch code:

:start
cls
netstat -b -n
ping localhost -n 2 >NUL


goto start

3. Press Alt key and choose Save and than Exit.

making simple batch job script to monitor by netstat
 Pic. 04.

In this case I have used ping command to make small delay between each probe so we can observe how our connections are changing. Now put the window with command prompt next to IE window as shown on picture below.

put windows next to each other
 Pic. 05.

1. In command prompt launch our monitor by typing in: netstatmon.bat and press Enter.
2. Try to access any website in IE and observe how the connection is initiated in your command prompt window.
3. To stop running batch job press Ctrl+C and then confirm ending by inputing Y when asked to do that.



If you are finding this article useful, please vote:
( 0 users found this article useful )

Comments

avatar zaczytany w google addsach
0
 
 
czyzby ta strona umarla smiercia naturalna? przypomnij no mi jak to sie nazywa....... chyba cos jak "Slomiany zapal"... albo jakos tak.... miesiac bez wpisu toz to zgroza.....
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar Runako
0
 
 
Hi all. Great work, webmaster, nice design. Help me! Could you help me find sites on the: Imitrex naproxen sodium. I found only this - Imitrex and naproxen sodium. Objective medication overuse headache moh in cluster headache ch patients methods the authors describe a retrospective series of patients men. Low price viagra pills never have to online imitrex price worry about. With love :mad:, Runako from Uzbekistan.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar china wholesale
0
 
 
Great post and now I know what to do, thank you! Actually this Blog post helped me a lot. I hope you continue writing about this kind of entry.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar Dogpiles stock ticker symbol
0
 
 
Hey. It is curious that physical courage should be so common in the world and moral courage so rare.
I am from United and bad know English, give please true I wrote the following sentence: "Executive summary of object desktop 2007 object desktop is a layout of headline extraction sales divided to correct microsoft windows to begin a inventory of automatic manuals."

With respect :-(, Dogpiles stock ticker symbol.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar DALEBESSIE23
0
 
 
Excellent subject just about university! Very helpful to be honest! If you're hurry, feel free to contact our term paper writing service that can help you with colossal custom research paper. Cheers!
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar Christy18Jackson
0
 
 
I opine that the colossal storage of the thesis pdf about this good post should be at thesis service. Thence, there’re no problems to run to buy dissertation service and buy thesis theme.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar Cross25Faith
0
 
 
To reach academic success, some persons have to determine if they want to accomplish the custom essay order or buy the online essay of the greatest quality.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar MARTA19EVANS
0
 
 
That is beyond question that the masters buy research paper service would write the best papers for money for men which don’t have writing skillfulness. That will be the best way out for them, I opine!
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar submit article
0
 
 
If I were you I would like to share such really good topic close to this good post utilizing the article submission service.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar plagiarism detect
0
 
 
Lots students pass the responsibility to expert writers because they don't have the talent to compose a satisfactory paper about this topic in that the reason why students need to use plagiarism checker, but such customers like composer don't do that. Thank you very much for the knowledge
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar mp3 ringtones
0
 
 
Oh, I have been watched this superb fact on the mp3 ringtones or free mp ringtones performing site. It used to be a kind of great job, thank you so much.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar petrty
0
 
 
interesting ideas are aired there. I am generally interested in such kind of stuff and look for something fresh and new mostly by means of rapidshare search engine http://rapid4me.com . But this video is something absolutely new for me.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar Mobile Hairdresser
0
 
 
Very interesting
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar Adriano
0
 
 
Molto interessante blog che ho bruciacchiato per il RSS tradotto tramite RssItaliano
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar Agness
0
 
 
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar online antique mall
0
 
 
Interesting but wish there is a translation feature for foreign languages.. :)
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar Vladimir Penile
0
 
 
This is great article, it can help me a lot with my final work in the university.
Thank you for sharing. Will give it as a reference
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar buy dissertation
0
 
 
The information you provided is quite simple and clear for knowledge seeker. Thanks for your research anyways.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar online forex trading
0
 
 
thanks for the tutorial!
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar Ford Spares
0
 
 
In this way we may check if there are any other ports open which could sugges that we have got some unwanted software installed such as trojan horses, key loggers or other backdoor applications.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar herve leger dress
0
 
 
All looking so nice.Thanks for this nice info.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar NIKE AIR MAX
0
 
 
Resources like the one you mentioned here will be very useful to me! I will post a

link to this page on my blog. I am sure my visitors will find that very useful.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar north face
0
 
 
This was a good read, kinda early in the morning though. Should do some work Laughing lol
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar granite sink
0
 
 
I love your blog, dont find many that are so clear, It is nice to see that someone really understands.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar ceramic sink
0
 
 
I really enjoyed reading this. Thanks for the post.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar honeycomb panels
0
 
 
So informative things are provided here,I really happy to read this post,I was just imagine about it and you provided me the correct information I really bookmark it,for further reading,So thanks for sharing the information.
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar replica watches new york
0
 
 
Cool comments. Big thanks for all visitors and for author. I love this site!!!
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar chanel jewelry
0
 
 
Awesome blog. Very informative. Your blog is very valuable from the blogger’s mind. Keep it up!
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar Ed hardy wholesale
0
 
 
I admire the valuable information you offer in your articles. I will bookmark your blog and have my children check up here often. I am quite sure they will learn lots of new stuff here than anybody else!

Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
avatar new jordans
0
 
 
Thanks a lot for enjoying this beauty article with me.
Thank you for sharing with us.
Very well information, lots of thanks to the author. It’s puzzling to me now, but in common, the helpfulness and significance is overpowering. Very much thanks again and best of luck!
Name *
Email (For verification & Replies)
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
Name *
Email (For verification & Replies)
Code   
Submit Comment

Last Updated ( Friday, 24 April 2009 12:00 )