Using Dropbox as a DNS server

So at Dev8D we had a session on sharing handy hints and tips to save time and effort. The subject of Dropbox came up, so here’s one of my favourite Dropbox hacks.

At home I have about 4 devices on my network. I like to refer to each by hostname rather than IP address (I SSH a lot), but I dont want to have to run my own DNS server.

The solution to this is pretty simple (and very hacky). On one machine, I configured /etc/hosts to map each hostname to their IP address. Once I had it all set up correctly, I moved hosts to my Dropbox folder, and created a symlink in it’s place (so /etc/hosts points to /home/mark/Dropbox/hosts). I then set up the same symlink on my other machines. Now updating the hosts file on one machine will sync the changes to all other machines, giving me hostname to IP address resolution without DNS.

Bookmark the permalink.

2 Responses to Using Dropbox as a DNS server

  1. Great idea, thanks. Has the other advantage of backing up all your hosts information in case of HD failure. Which matters if you’re using a setup like this:

    (I’m now putting hosts and ~/.ssh/config on Dropbox).

  2. Dhruv says:’s a great idea to sync /etc/hosts file on all devices. It can never be a more simpler than this.

Leave a Reply to Dhruv Cancel reply

Your email address will not be published. Required fields are marked *