RoboRobok's avatar

Homestead and dnsmasq to map all *.test domains

Hi guys,

I used to have dnsmasq working in the past, mapping all *.test domains to my Homestead machine. This time I can't make it work on Mojave.

  1. I installed dnsmasq with Homebrew: brew install dnsmasq.
  2. In /usr/local/etc/dnsmasq.conf I put address=/test/192.168.10.10.
  3. I created /etc/resolver/test file and put nameserver 127.0.0.1 there.
  4. Not sure what to do with resolv.conf, I have nameserver 172.20.10.1 there (also tried 127.0.0.1).
  5. Running it with sudo brew services start dnsmasq.

It's not working though, trying for example ping -c 1 abc.test, but the answer is:

ping: cannot resolve abc.test: Unknown host

Any ideas?

0 likes
1 reply
RoboRobok's avatar
RoboRobok
OP
Best Answer
Level 7

It worked after macOS restart for some reason. Before, restarting dnsmasq didn't help. I also tried to restart macOS before and it didn't work neither, so I have no clue why it works now.

Please or to participate in this conversation.