I do a lot of web dev, mainly RoR and PHP, I've got a VMs which holds my dev environments and handling multiple clients on them is a pain. With PHP you just create a subdir, but with RoR it's a little bit painful.

What I would like to do is create a local DNS server which would redirect queries to a certain TLD to my VMs/Servers.

The TLD would look like *.php.dev would go on the php VM and mysql.dev would point to the MySQL server and so on.

I struggled with a local BIND server but it's a real pain. Do you have lightweight alternatives for BIND, preferably ruby/python based.

I tried RubyDNS but eventmachine crashes every time.

Last thing: I run on a MacBook pro with OSX 10.6

Edit I tried dnsmasq but i run in another problem: OSX has a bind daemon to cache. I will investigate how to disable.

  • I am not sure why you struggle so much with BIND. Yes, there is a bit of a learning curve, but once you are through that it works like a charm. And it is definitely capable of giving you what you want. Maybe you could post more detail about the exact problem and then we can help you. – wolfgangsz Jun 17 '11 at 10:32
  • What are you actually asking here? How to setup local views? Or is this a BIND config issue, or do you want a list of DNS servers that aren't BIND? – Tim Post Jun 17 '11 at 11:01
  • I find BIND to be too heavy for what i'm looking for. I'm looking for lightweight and easy configurable alternatives to BIND. – Jeremy David Jun 17 '11 at 11:07

We use dnsmasq for exactly this. You can create CNAME records, which define a name aliased to some other, real, name, by editing the configuration files; it's really easy.

Here's some of what we've put in our /etc/dnsmasq.conf:


We have machines called balham, bank, and victoria. We've set up CNAMEs for vpn.initech.office and so on which point to them.

We run it on Linux, but it runs on OS X too.

| improve this answer | |
  • It is also used on Linux-powered routers running firmware like DD-WRT and Tomato. – paradroid Jun 17 '11 at 11:52
  • Do you have an example of config ? The DNS recods files tend to melt my brain really fast. – Jeremy David Jun 17 '11 at 13:13
  • @Jeremy: i've added examples. – Tom Anderson Jun 17 '11 at 14:54

I'm the developer of RubyDNS. It looks like you are already running something on the same UDP port by the error message. Also, it seems like you are using an older version of RubyDNS. I'd recommend that you upgrade to the latest release.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.