Reputation: 22755
I'd like to point all *.test domains to my Laravel Homestead machine on 192.168.10.10. I used to have it working with *.dev domains, but after new *.dev policy implemented by Chrome 63, I prefer to change it to *.test.
I fail to understand how local DNS works, as it seems to use trillion different configs and caches. What I did is:
me.test
works. It works./usr/local/etc/dnsmasq.conf
, I do have an entry address=/.test/192.168.10.10
(I also tried with 127.0.0.1)/etc/resolver/test
file, I put nameserver 127.0.0.1
- it used to work this way with /etc/resolver/dev
. I still don't understand why it's 127.0.0.1
and not 192.168.10.10
. I tried both anyway.sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache
sudo launchctl stop homebrew.mxcl.dnsmasq; sudo launchctl start homebrew.mxcl.dnsmasq
.http://me.test/
.It doesn't work. The domain will take forever to be loaded and nothing happens.
What am I doing wrong?
My OS is High Sierra, dnsmasq installed via homebrew.
Upvotes: 2
Views: 1974
Reputation: 1088
I don't use dnsmasq, but I believe you want to edit /usr/local/etc/dnsmasq.conf
and have listen-address=127.0.0.1
set so dnsmasq is listening on that IP, but have address=/.test/192.168.10.10
so that .test
is routed to 192.168.10.10
.
Then make sure System Preferences -> Advanced you have 127.0.0.1 as the first DNS server entry for your connection.
Make sure you're restarting dnsmasq every time you edit the configuration file.
Upvotes: 4