Verify web server availability using portqry

1 comment | 9I like it!
May 22, 2008, 10:17 PM —  ITworld.com — 

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.

Read more about operating systems in ITworld's Operating systems section

ITworld.com

Sign up for ITworld's Daily newsletter
Follow ITworld on Twitter @IT_world

I like it!
Close

On Twitter now

portqry

Powered by Twitter
You are logged in | Sign out
Sign in and post to Twitter

What are you thinking?

Cancel Tweet sent

On Twitter now

Comments

I like your solution;

I like your solution; however it is limited to only the windows world, which is not the entire web world.
When users complain to me that a Web server is down I use good old TELNET. The telnet command always works, just type
telnet webserver.domain.com 80
If you get a connected response you know a port listener is running. You can also type in http and hit return and the web server will respond with error information, again confirming that the web server is running.
This solution works on all operating systems and all web servers and is not hampered by a firewall unless that was the original problem.
| reply
peer-to-peer

Brian Proffitt
Microsoft/Novell: Breaking Down the Coupon Numbers

Esther Schindler
Drupal's Dries Buytaert on Building the Next Drupal

Tom Henderson
Top Ten General Operating Systems Rants

pasmith
PS3 motion controller delayed; goes up against Project Natal

sjvn
Neolithic Windows security hole alive and well in Windows 7

claird
Perl source code comparison makes for good reading

mikelgan
Cell phones don't create stress or interrupt much

Sandra Henry-Stocker
How to: The Unix Interview

 

Where Google Chrome security fails: the password
I heard mention that the Chrome OS will have some sort of encryption available a la bitlocker. If it's possible to encrypt personal data using another password or key, then it may have potential for very secure data.... And Ubuntu has an 'encrypt home directory' option, perhaps google should follow suit.
- Dann

Join the conversation here

The Daily Tip

The Daily TipQuick, practical advice for IT pros. Made fresh daily.

Hot tips:

Want to cash in on your IT savvy? Send your tip to tips@itworld.com. If we post it, we'll send you a $25 Amazon e-gift card.

Newsletters

Subscribe to ITWORLD TODAY and receive the latest IT news and analysis.

I would like to receive offers via email from ITworld partners.
By clicking submit you agree to the terms and conditions outlined in ITworld's privacy policy.
Marketplace