From: www.itworld.com

Verify web server availability using portqry

by Mitch Tulloch

May 22, 2008 —

 

Say you have an IIS7 Web server somewhere on your Intranet, and users start calling Helpdesk complaining that "our internal website is down." What can you do to verify if this is really the case?

You could try pinging it:



C:\>ping 172.27.33.11Pinging 172.27.33.11 with 32 bytes of data:Request timed out.Request timed out.Request timed out.Request timed out.


So then, is the Web server down? Maybe, but it could also be that Window Firewall on the Web server is turned on and is blocking incoming ICMP ECHO REQUEST packets (which it actually does by default on Windows Server 2008) and that could be why you aren't receiving any ICMP ECHO RESPONSE packets in return. In that case, your Web server is probably still humming along fine but it simply refused to acknowledge itself when you tried pinging it.

What should you do? Well, you could enable inbound ICMP ECHO REQUEST traffic in Windows Firewall on your Web server. That way you can ping it anytime you need to in order to make sure it's still up and running. The downside of doing this however is that it increases the attack surface of your Web server by making it vulnerable to certain types of ICMP attacks.

Another solution would be to try using a different tool to check if your Web server is still present on the network. One such tool you could use for this purpose is Portqry, a TCP/IP connectivity testing tool that is included as part of the Windows Server 2003 Support Tools and also on the Companion DVD included with the Windows Vista Resource Kit. The cool thing about using Portqry for this purpose is that it will work even if Windows Firewall is enabled on the Web server and incoming ICMP traffic is blocked. Here's how to use it to test whether your Web server is still listening for incoming HTTP requests on port 80:



C:\toolkit>portqry -n 172.27.33.11 -e 80 -iQuerying target system called:172.16.11.163TCP port 80 (http service): LISTENING



Portqry is a useful tool to include in your administrator's toolkit. Learn how to use it and keep it handy on your administrator workstation.