Closed thoni56 closed 1 year ago
@thoni56 Have you done this part: https://devilbox.readthedocs.io/en/latest/howto/dns/add-custom-dns-server-on-mac.html#howto-add-custom-dns-server-on-mac
@vikas5914 Yes, of course. Added 127.0.0.1 first and then I get the nslookup
above, which clearly states that it tried 127.0.0.1 but failed and continued to the next server. When I remove my ordinary server, no name lookup works, so no internet access or nothing.
My guess is that the built in DNS server does not handle the requests that are sent from modern MacOS/nslookup correctly or completely. Is there a way that can monitor that traffic and be explicit about what is really sent to the Devilbox DNS?
Also this is the output of dig
:
MacBook-Pro-3(arm64):~ $ dig @127.0.0.1 events-copy.dvl.to
; <<>> DiG 9.10.6 <<>> @127.0.0.1 events-copy.dvl.to
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 28161
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; OPT=15: 00 12 ("..")
;; QUESTION SECTION:
;events-copy.dvl.to. IN A
;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Sep 28 14:18:48 CEST 2023
;; MSG SIZE rcvd: 53
It clearly shows that a recursive lookup was requested from the Devilbox DNS server, but was refused.
@thoni56 Can you show that Port 53 is in use/LISTEN? Something like netstat -an | grep -E 'LISTEN\s*$'
(I don't if this work in MAC)
When Devilbox is not running there are no other processes on port 53:
MacBook-Pro-3(arm64):~ $ netstat -an | grep -E 'LISTEN\s*$'
tcp4 0 0 127.0.0.1.51825 *.* LISTEN
tcp6 0 0 *.51816 *.* LISTEN
tcp4 0 0 *.51816 *.* LISTEN
tcp4 0 0 127.0.0.1.631 *.* LISTEN
tcp6 0 0 ::1.631 *.* LISTEN
tcp4 0 0 127.0.0.1.9000 *.* LISTEN
tcp4 0 0 127.0.0.1.49175 *.* LISTEN
tcp6 0 0 *.5000 *.* LISTEN
tcp4 0 0 *.5000 *.* LISTEN
tcp6 0 0 *.7000 *.* LISTEN
tcp4 0 0 *.7000 *.* LISTEN
tcp4 0 0 127.0.0.1.11000 *.* LISTEN
tcp4 0 0 127.0.0.1.33334 *.* LISTEN
tcp4 0 0 127.0.0.1.33333 *.* LISTEN
tcp4 0 0 *.88 *.* LISTEN
tcp6 0 0 *.88 *.* LISTEN
tcp4 0 0 *.445 *.* LISTEN
tcp6 0 0 *.445 *.* LISTEN
tcp4 0 0 *.5900 *.* LISTEN
tcp6 0 0 *.5900 *.* LISTEN
tcp4 0 0 *.22 *.* LISTEN
tcp6 0 0 *.22 *.* LISTEN
With Devilbox:
MacBook-Pro-3(arm64):devilbox $ docker compose up -d bind
[+] Running 1/0
✔ Container devilbox-bind-1 Running 0.0s
MacBook-Pro-3(arm64):devilbox $ netstat -an | grep -E 'LISTEN\s*$'
tcp46 0 0 *.53 *.* LISTEN
tcp4 0 0 127.0.0.1.51825 *.* LISTEN
tcp6 0 0 *.51816 *.* LISTEN
tcp4 0 0 *.51816 *.* LISTEN
tcp4 0 0 127.0.0.1.631 *.* LISTEN
tcp6 0 0 ::1.631 *.* LISTEN
tcp4 0 0 127.0.0.1.9000 *.* LISTEN
tcp4 0 0 127.0.0.1.49175 *.* LISTEN
tcp6 0 0 *.5000 *.* LISTEN
tcp4 0 0 *.5000 *.* LISTEN
tcp6 0 0 *.7000 *.* LISTEN
tcp4 0 0 *.7000 *.* LISTEN
tcp4 0 0 127.0.0.1.11000 *.* LISTEN
tcp4 0 0 127.0.0.1.33334 *.* LISTEN
tcp4 0 0 127.0.0.1.33333 *.* LISTEN
tcp4 0 0 *.88 *.* LISTEN
tcp6 0 0 *.88 *.* LISTEN
tcp4 0 0 *.445 *.* LISTEN
tcp6 0 0 *.445 *.* LISTEN
tcp4 0 0 *.5900 *.* LISTEN
tcp6 0 0 *.5900 *.* LISTEN
tcp4 0 0 *.22 *.* LISTEN
tcp6 0 0 *.22 *.* LISTEN
@thoni56 Does the DNS work when Devilbox is running with a bind container?
@vikas5914 What do you mean? It always starts with a bind container, doesn't it? At least there is always one in the Docker desktop, even when I start it with "docker compose up -d httpd php mysql".
I'll try and explicitly add a bind container... Nope, no difference. And yes, it always starts the bind container, which is kinda necessary...
And since the Devilbox DNS answers with a REFUSE (as I showed above) I must be alive. And I can also ping the virtual host inside Devilbox. So there is something wrong with DNS requests coming from the host, that either gets distorted or misinterpreted on its way from the host to the Devilbox DNS process.
@thoni56 It Looks like something is wrong with the Bind. Also with dvl.to
you don't need AutoDNS. But the domain DNS is broken.
I suggest using dbox.dev
and disable AutoDNS. (set to some other port )
So, I have misunderstood the basis of AutoDNS in that I don't need that at all to reach any subdomain of dvl.to
? Where in the documentation is that described? I got the impression that in order to avoid editing the /etc/hosts
file you need to enable AutoDNS, but that is not true?
Also the documentation explicitly recommends not using .dev
since Google has registered that. So what is up with that?
And what exactly did you mean by "using dbox.dev
"? Should I change the TLD in the .env
file to that? And if I do, will lookups automatically route to 127.0.0.1
? And is how is this suggestion connected with "with dvl.to
you don't need AutoDNS"? Is it instead of dvl.to
?
@thoni56 For example, if you use a TLD or Domain that does not exist (Like .local
or .wip
or .asdsadasd
), you need Auto DNS to point those to 127.0.0.1
. The Documentation uses .loc
as an example. You will need Auto DNS to point any domain or subdomain *.loc
to 127.0.0.1
Both dbox.dev
and dvl.to
are real domains bought by people (dvl.to is owned by the project owner), and their subdomains are points to 127.0.0.1
by their name server. dvl.to was working fine until last month. It downed, and it's not working. So, a community member bought dbox.dev and did this point thing.
Where in the documentation is that described? => Its mentioned in the .env file. Check see the comment above TLD_SUFFIX
in .env
file. The documentation dos not mention or use dvl.to
anywhere. (https://devilbox.readthedocs.io/en/latest/search.html?q=dvl.to&check_keywords=yes&area=default)
And what exactly did you mean by "using dbox.dev" => use dbox.dev
as TLD_SUFFIX
. So the URL will <project_name>.dbox.dev
and automatically point to 127.0.0.1
without Auto DNS.
Thanks, @vikas5914, for that explanation. So there are actually two things going on here:
dvl.to
(not working right now), dbox.dev
as you mentioned. I successfully tried with localhost.tv
.Anyway, thanks for the help.
Have you already looked into this bug?
(Optional) Error message
;; Got recursion not available from 127.0.0.1, trying next server
What went wrong?
Trying to setup auto-DNS, have added 127.0.0.1 as first DNS-server, port 53 is propagated from docker container but get the following nslookup response:
Expected behaviour
That the build in DNS server answered "127.0.0.1" so that the virtual host inside the Devilbox docker container would be found.
How can we reproduce the bug?
Install according to instructions, enable auto DNS using
HOST_PORT_BIND=53
.I can also ping the server from within devilbox:
Host Operating System
MacOS
Host Platform (amd64, arm64, other)
arm64
(Linux only) Is SELinux enabled?
Not using Linux
Docker version
Docker version 24.0.6, build ed223bc820
Docker Compose version
Docker Compose version v2.21.0-desktop.1 - but I'm using "docker compose"
Devilbox version
Devilbox v3.0.0-beta-0.3 (2023-01-02)
Have you removed stopped containers before starting?
Yes
Have you pulled latest Docker images before starting?
Yes
Devilbox start command
docker compose up -d php mysql httpd
Config: .env file
Config: docker-compose.override.yml
No response
Config: ./check-config.sh
Log: docker-compose logs
(Optional) Additional information
No response