Playing with DNS

DNS is capable of a lot of weird and delightful things.

Aug 27th, 2020

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 FUN spelled wrong

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?"

Dig in

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.

Men&Mice was a category finalist at VMWorld 2018 in San Francisco

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.)

Cool factor > convenience

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 +short

Which returns:

Use sub, mul, and div in place of add for other operations.

Cloud storage is so passé...

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.)

There are no mistakes…

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

(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!

… only happy little accidents

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 @ -t naptr


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.

Send it to us on our Facebook, Twitter, and LinkedIn!

This image has an empty alt attribute; its file name is always-dns-1024x362.jpg
Via Reddit. And speaking of engineering and haikus: did you know about Juniper's?