Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I run a small development environment on my home network and was sick of having to edit the /etc/hosts file every time I needed to test a new website. I read around and found dnsmasq to be the best solution for my needs. I've installed it as described here and tested it, and it works great. When I run it, anything.dev directs to one Linux box (10.x.x.61), anything.test to another (10.x.x.62).

Unfortunately I have run into a problem starting dnsmasq whenever I have internet sharing turned on (which is all the time. My work laptop has no WiFi card, and so I need to share my wifi from the Macbook Pro to the Dell via ethernet). When I try to start the service I get this:

CRAINEs-MacBook-Pro:etc craine$ dnsmasq --test
dnsmasq: syntax check OK.
CRAINEs-MacBook-Pro:etc craine$ sudo /System/Library/StartupItems/DNSMASQ/DNSMASQ
Password:
/System/Library/StartupItems/DNSMASQ/DNSMASQ: line 1: #!/bin/sh: No such file or directory
Starting DNSMASQ

dnsmasq: failed to create listening socket for 192.168.2.1: Address already in use

Internet sharing hands out 192.168.2.x addresses to connected clients. As soon as I turn off Internet Sharing, I can start the service and names get resolved.

CRAINEs-MacBook-Pro:etc craine$ sudo /System/Library/StartupItems/DNSMASQ/DNSMASQ
Password:
/System/Library/StartupItems/DNSMASQ/DNSMASQ: line 1: #!/bin/sh: No such file or directory
Starting DNSMASQ

However, when I restart internet sharing, the work laptop can't resolve domain names anymore. I thought it might be a DHCP conflict, so I tried commenting out all of the DHCP related items in the dnsmasq.conf file, but still can't start the service with internet sharing enabled.

My question is this: Why is dnsmasq trying to bind to 192.168.2.1 when my machine's IP is 10.x.x.2 when there should be no interfaces with that 192 address? How can I change that address it binds to, as I don't see it anywhere in the configuration files?

If you need more info about my setup, please let me know. Thanks.

share|improve this question
Welcome to Server Fault! Your question is off topic for Serverfault because it doesn't appear to relate to servers/networking or desktop infrastructure in a professional environment. It may be on topic for Superuser but please search their site for similar questions that may already have the answer you're looking for. This answer further clarifies the scope of our site. – Iain Oct 8 '12 at 19:08
So if I had used "office" instead of "home" network then it would be applicable? How about a home office network? – Craine Runton Oct 8 '12 at 19:23

closed as off topic by Iain Oct 8 '12 at 19:08

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

Browse other questions tagged or ask your own question.