8

For my firewall scripts to determine whether my ISP is up I need a few reliable, geographically distributed addresses to ping.

I could just use some major sites like Google, Akamai, etc. But that seems rude. It is also unreliable, what if they decide to start blocking ICMP traffic like so many other sites already do?

I'd prefer to use hosts that have gone on the record saying they are ok with this. Are there any hosts that have offered to serve as a public "ping" target, the way many public NTP servers offer their services?

A list, or round-robin DNS of such hosts would be excellent, but I suspect that's asking too much...

masegaloeh
  • 18,236
  • 10
  • 57
  • 106
cecilkorik
  • 455
  • 1
  • 4
  • 13

2 Answers2

2

I'd recommend avoiding ping and looking at something like curl or telnet. You need to do this in two parts though, because it could be a nameserver issue.

Step 1: Verify functioning nameserver
Step 2: use curl, wget, or telnet (on port 80) and search the results for any known text.

This is better than pinging since you pretty much KNOW Google is going to be around to serve your requests on port 80.

Come to think of it, you could just do an nslookup on one of Google's nameservers (8.8.4.4 or 8.8.8.8) and if that succeeds, you're good.

pk.
  • 6,451
  • 2
  • 42
  • 63
0

Try taking a list of about 20 servers (Google, akamai, whatever), and only throw a critical fault when at least 3 fail. That way you won't be woken up at 3AM because one company decided to stop ICMP.

Hyppy
  • 15,608
  • 1
  • 38
  • 59