osx Mavericks: dnsmasq stops working

2019-03-19 09:28发布

I have been using dnsmasq on mac osx mountain lion which was installed via mac ports. Recently,I upgraded to Osx Mavericks and all of a sudden it has stopped working.

I examined the dnsmasq.conf and resolv.conf in /opt/local/etc/ which are unchanged. In addition the dnsmasq process is displayed running in the os activity monitor. I tried a force quit of the dnsmasq process as well.

Any suggestions? Has anyone experienced a similar problem?

3条回答
男人必须洒脱
2楼-- · 2019-03-19 09:57

I had issue with DNS after upgrade, in which is just wouldn't start from UI. Not using DNSMASQ myself, though you could look at this to see if is connected to your problem.

https://discussions.apple.com/message/23469825#23469825

Edit (as root) plist at /var/db/launchd.db/com.apple.launchd/overrides.plist

Look for <key>org.isc.named</key>

Set value of <key>Disabled</key> to <false/>.

查看更多
冷血范
3楼-- · 2019-03-19 09:59

Solved mine by doing the following:

  1. mkdir -pv $(brew --prefix)/etc/
  2. echo 'address=/.dev/127.0.0.1' > $(brew --prefix)/etc/dnsmasq.conf
  3. sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons
  4. sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
  5. sudo mkdir -v /etc/resolver
  6. sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/dev'

If your development domains are not .dev, then change the bolded parts to your domain. If you need other domains, you need to only repeat steps 2 and 6.


Source: This brilliant blog post by Alan Ivey.

查看更多
Luminary・发光体
4楼-- · 2019-03-19 10:15

The reason for why dnsmasq local-only domain not works any more on maverick is because BIND is no longer installed - even when the command line developer tools are added.

Here is link for detailed explanations.

查看更多
登录 后发表回答