Batch file for checking port status of multiple IP Address
11,155
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
Related videos on Youtube
Author by
Varun V
Updated on September 18, 2022Comments
-
Varun V over 1 year
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?
-
APR over 12 yearsYou could probably do this with
PortQry
. Do you always need to check the same ports? UDP/TCP/Both? -
Varun V over 12 yearsPortQry is useful but how to make a batch script or portqry to read the host list from a txt file, exicute the command and send the result to -l log.txt file
-
Varun V over 12 yearsThnx all for the support, My requirement got solved by using PortQry.
-
Varun V over 12 yearsi used the below in to the batch file.
-
Varun V over 12 yearsset protocol=TCP set port#=8080,4343,18443 for /f "tokens=1" %%V in (hs.txt) do portqry -n %%V -p %protocol% -o %port#%
-
-
Varun V over 12 yearsYes 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.
-
Varun V over 12 yearsi 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.
-
gWaldo over 12 yearsThis 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.)