Comments (18)
Thank you for all of the above.
After detailed debugging and following the steps mentioned I found
- We need to add the DNS to mac using
networksetup -setdnsservers Wi-Fi 127.0.0.1 192.168.0.1
- I was not restarting locally installed
dnsmasq
usingsudo
. Strangely restarting it without sudo does give a false positive. -- This was isolated by using dig.
I will supply a patch for the documentation inline with my learnings shortly.
from docs.
I had no clue .dev was a no go, wowsers! I've been using that for quite some time (hence the documentation). All four of tld's they list as safe look absolutely lame, but I guess .localhost
makes semantic sense...
I'd definitely support updating it so folks don't run into that issue. I like to err on the side of humor as the Lando team have, so pick something comical imo 🥇
from docs.
Okay, I reread and realised what happened. I should have clarified that add on 127.0.0.1
to output from existing entries from networksetup -getdnsservers Wi-Fi
. Can you manually set it to your router's IP address for now?
e.g., networksetup -setdnsservers Wi-Fi 127.0.0.1 192.168.0.1
Replace 192.168.0.1
with your router's address.
from docs.
I got stuck on the second issue as well. There is no error, but apparently it cannot bind to system ports as a regular user. It is an important gotcha for sure. :)
from docs.
Unless I am mistaken, I think there is something missing in the documentation. The documentation only covers running a DNS server locally (dnsmasq), but does not talk about getting Mac OS X to find the nameserver. Most references I found about adding the TLD to /etc/resolver/TLD
did not work for me.
After a bit of reading, I found that this address has to be added either via the System Preferences app (search for 'DNS') or the networksetup -setdnsservers Wi-Fi 127.0.0.1
command.
from docs.
Thank you for the analysis!
After a bit of reading, I found that this address has to be added either via the System Preferences app (search for 'DNS') or the networksetup -setdnsservers Wi-Fi 127.0.0.1 command.
Is ☝️ working for you?
Unfortunately in my case when I add 127.0.0.1
as a DNS, All the internet pages throw up DNS_PROBE_FINISHED_NXDOMAIN
error along with http://taher.local , https://taher.local
from docs.
@taherj Yes, I tried it and it worked. Make sure that 127.0.0.1
is the first IP in the list. Double check with scutil --dns
.
Also, try running dig taher.local @127.0.0.1
to see if dnsmasq is working properly.
from docs.
On further reading, I found that there is an issue with .local
TLD (not conclusive). In my case, dig
was working fine but ping
wasn't. Like suggested by the answer, I simply tried another TLD .site
. Both dig
and ping
work fine now.
EDIT: More info: https://en.wikipedia.org/wiki/.local
from docs.
I see this documentation was added in #106 and the link over there is the one I referred to as well. However, the documentation missed out on the last section which is to let OS X know to check dnsmasq as well.
from docs.
Have you tried visiting http://localhost:32896 ?
from docs.
@Mchampsee Yes http://localhost:32896 works.
The goal here is to get the TLD to work while we are offline.
from docs.
I wrote that doc page, huh, weird. I ran through the whole thing and had no issues, but it may be because I had DNSMasq running previously and tore down / rebuilt, so maybe it had some preset magic going. It may also be possible that High Sierra changed something about the setup. The .local domain issue would definitely cause problems, but I've never, ever had to do the whole networksetup -setdnsservers Wi-Fi 127.0.0.1
business, I'd question if that is necessary. The need to add sudo to the restart of DNSMasq could definitely have been something I missed.
from docs.
@dustinleblanc Would you please inform regarding the following :
- Which macOS version you are using for the documentation?
- Do you have
127.0.0.1
added in your networks entry already?
I understand the issue with the .local
TLD. I have since changed it to .dev
(as per the documentation) and checked as well. It does not seem to work on any browser without adding the 127.0.0.1
to the DNS.
It is probably a macOS High Sierra specific issue. I would propose we keep the docs updated to include these edge cases as well.
Thoughts??
Edit 1: @dustinleblanc You are right. Ideally, we don't really need networksetup -setdnsservers Wi-Fi 127.0.0.1
. Here is a summary :
- Inform users to avoid using
.local
,.dev
( Google 😞 ) TLDs. refer 1, 2 - If the user really needs/want to use
.dev
or any other reserved TLDs they need to add the DNS locally usingnetworksetup -setdnsservers Wi-Fi 127.0.0.1 <router_ip>
The current documentation has .dev
TLD as the example so including 2
makes sense. Or we can update any other TLD instead of .local
,.dev
in the example and we don't need not handle the DNS entry business altogether.
Thoughts??
from docs.
Definitely recommend .localhost as well.
What also might help with some dns issues on OSX is doing a
dscacheutil -flushcache
from docs.
I can't get localhost working without doing the following steps:
For OS X to resolve requests from *.local to localhost we need to add a resolver:
$ sudo mkdir /etc/resolver
$ sudo touch /etc/resolver/local
edit /etc/resolver/local
nameserver 127.0.0.1
re-start the computer to enable the resolver
from docs.
@pirog, I updated the documentation to get it working on OS X and also added the recommendation to not use *.dev as a TLD for development.
from docs.
@jbertoen awesome! thanks so much.
from docs.
@jbertoen i had the same issue on archlinux (manjaro), there is another configuration for my system ??
from docs.
Related Issues (20)
- Using Let's Encrypt SSL certificate
- Hello World example broken in Windows Powershell 7?
- export XDEBUG_SESSION="PHPSTORM" doesn't initiate listening in PhpStorm
- CLI value types HOT 1
- set docker-ce as a hard dependency for our packages?
- "myriad examples" link broken
- Add documentation how to use the YAML merge key (example supplied)
- How to do string concatenation in lando yml file? HOT 1
- Automate Sitemap Index Creation
- post vitepress tasks
- How to keep anonymous volumes when running 'lando rebuild'?
- Lando recipe for SonarQube
- What is the correct way to install on Windows/WSL2? HOT 5
- Better lando.yml Documentation HOT 5
- Broken Working Offline link on Troubleshooting > DNS Rebind page HOT 1
- Should I stay on 3.20.8? HOT 1
- Broken link in v3/services page HOT 2
- Docs mention a 3.22.1 for installation but this version doesn't even exist as a release HOT 3
- xDebug not being enabled though HOT 3
- Lando uninstall instructions and docker HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.