3

My question is the same as this one from 2 years ago.

I followed all the steps in this detailed answer with no luck.

In addition I also restarted my machine and removed my anti-virus software (Just to be safe).

Everything goes fine until I try to dig or ping a test domain. I've uninstalled and reinstalled everything, run brew doctor, etc.

All the files appear to be as they should, the services are all running according to brew.

I have php (7.2.5) installed instead of php70 as brew claims that package is outdated. I'm using the new default domain of *.test instead of *.dev, otherwise I followed the steps in this answer to a letter.

brew info dnsmasq results

dnsmasq: stable 2.79 (bottled)
Lightweight DNS forwarder and DHCP server
http://www.thekelleys.org.uk/dnsmasq/doc.html
/usr/local/Cellar/dnsmasq/2.79 (8 files, 516.3KB) *
  Poured from bottle on 2018-05-16 at 13:22:30
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/dnsmasq.rb
==> Dependencies
Build: pkg-config ✘
Optional: libidn ✘
==> Options
--with-dnssec
    Compile with DNSSEC support
--with-libidn
    Compile with IDN support
==> Caveats
To configure dnsmasq, take the default example configuration at
  /usr/local/etc/dnsmasq.conf and edit to taste.

To have launchd start dnsmasq now and restart at startup:
  sudo brew services start dnsmasq

ps aux | grep dnsmasq results

username           5152   0.0  0.0  4258468    184 s000  R+    5:04PM   0:00.00 grep dnsmasq

dig something.test results

; <<>> DiG 9.9.7-P3 <<>> something.test
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2961
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;something.test.            IN  A

;; ANSWER SECTION:
something.test.     10  IN  A   198.105.244.228
something.test.     10  IN  A   198.105.254.228

;; Query time: 77 msec
;; SERVER: 209.18.47.62#53(209.18.47.62)
;; WHEN: Thu May 24 17:06:34 EDT 2018
;; MSG SIZE  rcvd: 64
iicaptain
  • 1,065
  • 1
  • 13
  • 37
  • Can you explain what issue you are facing? – Tarun Lalwani May 23 '18 at 18:20
  • @TarunLalwani dnsmasq appears to be set up correctly but pinging something.test returns nothing. – iicaptain May 24 '18 at 01:00
  • Please add output of `brew info dnsmasq`, `ps aux | grep dnsmasq` and `dig something.test @127.0.0.1` to your question – Tarun Lalwani May 24 '18 at 05:18
  • Isn't dig showing the IP you want here? – Tarun Lalwani May 24 '18 at 21:13
  • This is not strictly on topic here since it is not related to programming. See [su] or [sf] instead. Also, try to have your question be self consistent, starting with 'it is the same than ...' without details makes it hard to read all the facts on the same page. And explaining a little what `Valet` is could help. And, never use `.dev` internally, it is an existing TLD, managed by Google, and added to the HSTS preloading list, so you will have all sort of problems if you name your internal resources with it. – Patrick Mevzek May 25 '18 at 14:04
  • The order of troubleshooting is pretty simple: 1) is your DNS server responding correctly for the name you want? (test with dig and the `@` parameter, never forget the `@`), 2) is `/etc/resolv.conf` configured correctly, if you are on Linux or otherwise the relevant setup, and 3) is your application using the system resolver? – Patrick Mevzek May 25 '18 at 14:05
  • I have found this for DNSmasq under MacOSx: https://passingcuriosity.com/2013/dnsmasq-dev-osx/ it may help but please **DO NOT** follow its advices to use a `.DEV` TLD, use a true domain name you registered instead. In fact that one: https://www.devops.zone/dns-server/installing-dnsmasq-on-mac-os-x-for-local-development/ seems simpler and to the point. – Patrick Mevzek May 25 '18 at 14:09
  • @PatrickMevzek Valet is is a development environment which is why I posed it here. As stated in my question I'm **not** using .dev but .test instead for the reasons you mention. .dev was the default domain used by valet 2 years ago when the question I referenced was answered. My dns is not responding correctly. Ideally dig would return 127.0.0.1. Valet only runs on OS X. – iicaptain May 26 '18 at 18:05
  • 1
    Laravel or not, your question is mostly about configuring dnsmasq and hence it is not very programming related. Try on [su] or [sf] you met get better help. – Patrick Mevzek May 27 '18 at 19:03
  • The `ps aux | grep dnsmasq` shows that dnsmasq is NOT running as it only appears the grep process. Try to start it. – LMC May 30 '18 at 15:55

0 Answers0