Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from programmers.stackexchange.com Jun 17 '11 at 10:58

This question came from our site for professional programmers interested in conceptual questions about software development.

    
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

2 Answers 2

up vote 2 down vote accepted

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:

domain=initech.office
cname=vpn.initech.office,balham
cname=mail.initech.office,bank
cname=cacti.initech.office,victoria
cname=opennms.initech.office,victoria

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.

share|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'll try it out, thanks –  Jeremy David Jun 17 '11 at 16:14

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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