Today's quiz question

Justin Dugger jldugger at gmail.com
Tue May 3 16:16:04 CDT 2005


Yes, the entire 127.* block acts as local loopback.  This knowledge is
far less widespread than 127.0.0.1, so feel free to replace it with
say 127.4.65.234 (or whatever) when abusing n00bs and "hax0rs."   Feel
free to look up the RFC on it, it should confirm my position, although
it may be so old as to use something like 127/24 notation. 
Unfortunately, not every program works this way. I just tested it out
on OSX and it failed to respond to anything but 127.0.0.1. In
contrast, Ubuntu reponds to anything within that 127.* block. I would
expect Debian and most other distros to act the same way (barring a
firewall rule blocking ping requests).

As for ping, as goku mentioned, 127 is 0x7f in hex (only the first bit
isn't set in that byte. I don't know exactly why the .1 part is
assigned to the end, other than to say that's the way its programmed.
You should get the same results as typing in "ping localhost."

A borderline amusing usage of hex addressing but it's only point is to
obfustcate things.  For future reference, 0x is the common prefix to
indicate that you're looking at a hexadecimal number.  Another common
base is octal, and is indicated with a leading 0. This is even less
well known, leading to the confusing command

    ssh 0177.1

A box which suspiciously has the same password as yours!

Justin

> adding .1 just makes it work. Weird though. Seems like 127.1.*.* are
> all able to be pinged and get a response from 127.0.0.1.


More information about the Kclug mailing list