March 18, 2006

Curious George: Ping. Why does ping work on some sites but not others? For example I tried "ping www.nytimes.com" and always get "request timed out". But it works fine for google.com and other servers. Do some web servers block pings?
  • Yes. Some sites block the ICMP echo request (which ping uses), so you can can't ping them. Maybe they did it for security reasons, though it's not really much of a risk.
  • It's not the sites, it's the unstream ISPs, or their data centres. It's to prevent denial of service attacks - one variant of which is where you flood a server with pings from many different sources: a Ping flood.
  • That's not always true. Some individual sites will block ICMP echo, as will some ISPs. Ping floods are less common these days, as they have become less effective due to improved network technology. But some sites will also block ICMP echo because it can be used to do network scanning.
  • I agree with un- another site that blocks it is CNN.com
  • I'm actually writing a program to monitor my DSL connection by pinging a few different sites, once per minute. I'm not sure if ping is worthwhile for this, so I've considered finding a few very tiny webpages (like < 10 bytes) and http accessing those once every minute.
  • WhatIsMyIP.org is 12 bytes, plus they're 12 useful bytes.
  • what's worse is some sites also block ICMP Fragmentation Needed packets which are used for path MTU Discovery, thus rendering them unreachable by some internet users (especially PPPoE users)
  • I've considered finding a few very tiny webpages If ping doesn't work for the sites you want, why don't you just send a HEAD (instead of a GET) HTTP request? The result will be shorter than a short web page :).
  • Does anyone know how to monitor a Linux (RH8) box's ip traffic, using only stock tools? Something that might show current bandwidth usage.. etc.
  • Monitoring IP traffic in Linux is often done with MRTG. It's free (GPL), written in Perl and I installed it on my system with "yum install mrtg", Is that stock enough?
  • RH8 doesn't come with yum, and for some reason, this install doesn't have a compiler. "In order to compile and use mrtg you need a C compiler..." I'm screwed.
  • I can't imagine a system without a C compiler! That's un-heard of. Well, are you allowed to install rpms? There's gotta be an rpm for mrtg for RH8. Or you can run "netstat -i" in a loop and graph the results in gnuplot. heh.
  • Rawk! Thx.
  • Then again, he is on Jimmy Kimmel. Oh, and it was funnier when he was being interviewed on NPR.
  • wtf?