Live data from Hacker News

Google DNS at 010.010.010.010

8.8.8.8

41–50 of 132 posts

Re: Google DNS at 010.010.010.010

#41
post #20
post #4

For me the link on HN is to https://dns.google/ but I'm pretty sure it's supposed to be to https://010.010.010.010/ (which redirects, for me). Did the admins change it?

Is that a real TLD?

No, it's an IPv4 address. No TLD is allowed to be a series of digits in order to avoid any confusion about this.

Whether your URL parser considers that octal IPv4 addresses are a reasonable thing is up to each individual parser. On the whole I'd suggest user-facing software should not permit this because it's pointlessly confusing.

Rust took a patch that says if you try to convert (for example) 010.010.010.010 to an IPv4 address that's an error, which again I think is reasonable for the same reason.

In the patch feedback several people want it to mean 10.10.10.10 and others think it should mean 8.8.8.8 and eventually it seems to become clear to both groups that this is itself a terrible sign for their positions, since if you expected one but got the other now your software has unexpected behaviour, whereas if you got an error you can fix your program to do whatever it was you intended. So hence the error behaviour won.

[Edited to add: It has been pointed out to me that maybe the poster meant .google. Yes, that's a TLD owned by Google. They applied for, and received a number of "new gTLDs" from ICANN, some like .dev are open for you to register 2LDs in, others like .google are only for their own use. Running TLDs likely costs Google somewhere in the region of a million dollars per year to maintain, but that's a drop in the ocean for a large tech company.]

Re: Google DNS at 010.010.010.010

#42
post #22
post #19

Earlier quoted context omitted.

It's weird that this is just a side-effect of the way strtol works, but there's no way (that I can figure out) to get + or - involved.

It can't only be that, or 127.1 would not work. It is doing some parsing beyond just calling a parseInt on each of them in order to recognize domain names and use name resolution rather than directly putting the bytes in the IP header. That must be why 0x9000000.-16250872 doesn't work (if negative worked, that should also resolve to 8.8.8.8).

I looked into this a while back, IIRC BSD added the "omit zeroes" as a nonstandard convenience feature and other OSes copied it. I'm far afk for I'd find my notes on this.

Re: Google DNS at 010.010.010.010

#44
post #4

For me the link on HN is to https://dns.google/ but I'm pretty sure it's supposed to be to https://010.010.010.010/ (which redirects, for me). Did the admins change it?

Our software follows redirects now. Obviously that's not correct in cases like this; but it's so much of an improvement in other cases that I don't want to roll it back. Not sure what to do yet really.

I've changed the URL above back to https://010.010.010.010/ now. Thanks!

Re: Google DNS at 010.010.010.010

#45
post #20

Earlier quoted context omitted.

Is that a real TLD?

TLS certs can be issued to make them work with IP addresses, which is why https to 8.8.8.8 (octal: 010.010.010.010) works: https://cabforum.org/guidance-ip-addresses-certificates/ See also: https://01.01.01.01/ (btw: .google and .goog are valid TLDs)

Not explicitly mentioned in that CAB/F document, the PKIX standard that makes ipAddress SANs work actually defines them as numeric types with a set number of bits, so an ipAddress is literally a 32-bit or 128-bit value.

This leaves no room for the ambiguity of the text rendering something like 010.010.010.010 in the certificate itself.

Likewise the dnsName SAN type is defined in an alphabet for X.509 that literally can't represent fancy Unicode, so you can't mistakenly write certificates with dnsName SANs that give the Unicode name instead of the unambiguous punycode name stored in DNS.

These two choices mean your browser can mechanically with 100% reliability check certificates in the Web PKI match the IP address or DNS name from the URL you believed you were visiting, whereas historically the abuse of "Common Name" features to write a human representation had nasty edge cases for both IP addresses and some DNS names.

Re: Google DNS at 010.010.010.010

#48

Out of sheer curiosity, how does one go about reserving an IP address like this, or the ones CloudFlare and google dns use?

IP address ranges were allocated to various organizations that can declare routes for them onto their own networks, or sell to other parties.

This is most commonly seen with large clouds like AWS buying millions of IPs from owners that weren't using them.

You can use "whowas" to track the ownership shifts, but I don't know of a global index-- each NIC has their own implementation and restrictions.

https://www.apnic.net/static/whowas-ui/#1.1.1.1

Re: Google DNS at 010.010.010.010

#49
post #20
post #4

For me the link on HN is to https://dns.google/ but I'm pretty sure it's supposed to be to https://010.010.010.010/ (which redirects, for me). Did the admins change it?

Is that a real TLD?

Without getting into the existential question of what does it mean to be real, yes [0]. It's one of the sponsored modern TLDs[1], along with the likes of .horse, .cat (not what you think), .wiki, .club, etc.

[0] https://en.m.wikipedia.org/wiki/.google [1] https://en.m.wikipedia.org/wiki/Sponsored_top-level_domain

Post reply on HN