DNS is serious business. Which is, arguably, another word for "boring." For the longest time, it was called the "phonebook of the internet" — can you imagine anything less fun than a phonebook?
Thankfully, that metaphor is going away (just like phonebooks; when was the last time you saw one?) and DNS becoming more accepted as… what is DNS, exactly? We very much like Spotify's take on it as "a distributed, replicated database tailored for read-heavy loads."
But that still doesn't exactly tickle our fun receptors, if we're honest.
DNS is very much in line with most other technologies in its capabilities to be used creatively. And where's creativity, there's fun. (And where's fun, there can be profit. But that's a story for another time.)
DNS is capable of a lot of weird and delightful things. As summer slowly winds down, we thought we'd highlight a few of these lesser-known use cases for DNS, ranging from "it works, but why" to "it works but… wait, what?"
Most fun DNS tricks are done through dig. (And friends don't let friends use nslookup.) It's a great tool to learn for anyone working with networks.
We dig DNS, as demonstrated by Helga at our trip to VMWorld in San Francisco last year. (And, also demonstrated by the picture above, the tech media digs us.)
Sure, you can use your phone or a gasp actual calculator, but DNS? That's where the cool kids are!
The Information Sciences Institute at the University of Southern California maintains (at least as of this writing) a way to add, subtract, multiply, and divide using DNS:
dig 12.30.add.calc.postel.org @dns.postel.org +short
Which returns:
0.42.0.0
Use sub, mul, and div in place of add for other operations.
Sure, your Box (Dropbox, iCloud, Amazon EFS, <insert cloud storage name here>) is a great way to store files securely. Your computer crashes, they're still available.
But how about storing data in DNS? Maybe not the 6.3GB of videos from your phone, but surely a blog post would fit? Turns out: it does. And Ben Cox did just that.
(And if a DNS-based file system still isn't hipster enough for you, you can try PingFS. Yes, you can store data in echoes. Indeed, humanity's capacity for creativity is boundless.)
Most people somewhat familiar with DNS know the major record types like A/AAAA, CNAME, or MX. However, for our current purposes, let's take a closer look at the TXT record.
As the name suggests, TXT records store text. They can be used for verifying ownership of a domain or storing machine-readable data for automation.
But that's not all that much fun, is it?
A more entertaining (or, if you live in a country with strict censorship, downright liberating, as it circumvented deliberate DNS poisoning by the government) way to use TXT records was when David Leadbeater used TXT records to store Wikipedia pages in 2008.
That project isn't available any longer, nor is another fun experiment of reading Twitter through TXT records, but the technology is still there to use, as demonstrated by Breanne Boland:
dig txt X.maybethiscould.work
(Where X is a number between 1 and 50.)
For all its fun, there are a few limitations for full artistic expression via TXT records, including their unordered nature. But there's an app another record type for that!
When the IETF standardized NAPTR records, they most likely did not do it to allow ASCII art to be stored in DNS. But, since it allows for the order of text to maintain its structure, it does:
dig @208.67.222.222 -t naptr eff.org
This is but a taste of the creativity DNS allows us to express. There's a lot more. And if you're up to it, maybe yours can be a new one on our favorites list.