Storing Geopresence in DNS

Peter Rukavina

A little geopresence procrastinating tonight: using RFC 1876 as a guideline, I wired up my [[Plazes]] geolocation to a dynamic update of a DNS LOC resource record. This means that finding out where I am is, from the Unix command line, as simple as:

# dig +short peter.rukavina.net LOC
46 14 9.103 N 63 7 26.951 W 0.00m 10m 10m 50m

It took a little while to figure out the proper way to represent the LOC record in my rukavina.net zone file. It turns out it’s really quite simple, and exactly as described in the RFC; my issue was that I had peter.rukavina.net set up as a CNAME instead of an A record, and this caused issues. Changing it to an A record solved my problem.

I’m using a simple call to the Plazes API to grab my current location, and then using nsupdate (which is lovingly documented here) to do the dynamic update of my DNS server, feeding it a file that looks something like this:

server localhost
zone rukavina.net
update delete peter.rukavina.net. LOC
update add peter.rukavina.net. 1800 LOC 46 14 9.103 N 63 7 26.951 W 0m 10m 10m 50m
show
send

I’ve been thinking about a vendor-independent decentralized way of storing geopresence information for a long time; while using DNS might be too infrastructure-dependent to be a useful solution for everyone, it seems, at least on the surface, to be quite a dreamy way of achieving this.

Comments

Add new comment

Plain text

  • Allowed HTML tags: <b> <i> <em> <strong> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

About This Blog

Photo of Peter RukavinaI am . I am a writer, letterpress printer, and a curious person.

To learn more about me, read my /nowlook at my bio, listen to audio I’ve posted, read presentations and speeches I’ve written, or get in touch (peter@rukavina.net is the quickest way). 

You can subscribe to an RSS feed of posts, an RSS feed of comments, or a podcast RSS feed that just contains audio posts. You can also receive a daily digests of posts by email.

Search