1

How to check the port status of multiple IP Addresses from windows command prompt. I am looking for some Batch file or a Dos SCRIPT. Can anyone help on this?

Bart De Vos
  • 17,911
  • 6
  • 63
  • 82
Sunil Reddy
  • 11
  • 1
  • 1
  • 2

2 Answers2

3

You could use nmap http://nmap.org to script something to check and list whats open on a given host or set of hosts

TiZon is right though, wed need to know more about what youre wanting to do before we could give a more concise answer.... Are you checking more than one host, the same ones over and over, more than one port, etc?

Just a wild assumption... If you want a robust monitoring and alerting system you could look at nagios www.nagios.org its free and does a great job monitoring and alerting for things like open / closed ports

  • Yes i am trying to find the status of multiple ports like 8080,4343 on multiple IP addresses i.e list of systems in a txt file. – Sunil Reddy Sep 08 '11 at 13:18
0

I second nmap, but you can check for open connections with telnet

Telnet computer port

Such as:

telnet webserver1 80
gWaldo
  • 11,957
  • 8
  • 42
  • 69
  • i have to find the multiple port status for multiple IP address nearly about 400+ systems. I am looking for any simple batch script which can generate the status of port in to a log file. – Sunil Reddy Sep 08 '11 at 13:31
  • This can be accomplished via a `for` loop given a list of servers, and at the end of the telnet command, append ">> filename.log" to the end of the command so that it appends the output to a file of your choosing (creating the logfile if it doesn't exist.) – gWaldo Sep 08 '11 at 15:11