Sunday
Jan172010

Is that port open? Test for open ports in Windows 2008 without telnet.

Been doing a lot more with Windows 2008 these days.  Our mad modern world has gotten the folks at Redmond a lot more cautious and we're seeing it more in their offerings. 

One subtle example is the absence of telnet.exe on the default installation of the latest OS's from Microsoft.  It's a necessary absence, but sorely missed by me when I want a quick-and-dirty way of testing for open ports.

Used to be if I was configuring a server in a DMZ and wanted to ensure it could reach a certain point via our firewall I could open a command prompt and execute a telnet MAILSERVER1 25 to see if the remote mail server was responding (with "MAILSERVER1" being the remote mail server and 25 being the port for SMTP that your typical mail server would have to be listening on). 

Happily the folks at Microsoft have a tool that more than makes up for telnet's departure.  I've come to rely on portqry. This utility is rich with features, so it's a shame I haven't gotten around to using it for more than just a quick-and-dirty telnet replacement.

Nevertheless quick-and-dirty gets it done, so here's a wrapper script to get me the same quick results in the safer world of modern-day Windows OS's.  Call it telnet.bat, if you like: