Am 19.01.2023 um 20:24 schrieb Greg Wooledge:
> On Thu, Jan 19, 2023 at 07:45:34PM +0100, Maurizio Caloro wrote:
> Let's start here. Why do you have multiple nameserver lines here?
> Which one is the bind9 server that you're configuring? That should be
> the only line.
>
> If the bind9 server is 127.0.0.1 then just keep that line, and remove
> the other two (or comment them out with semicolons).
>
> When you've got multiple nameserver lines, the resolver library will use
> whichever one it wants to use first. If that one returns NXDOMAIN, then
> it stops there. It doesn't look at the other lines.
>
> It will only look at the other lines if there's no response at all from
> the first nameserver it tries.
> The ping command is not the best choice for debugging DNS server setups.
> The major issue here is that you don't know which nameserver was used
> to get this result.
>
> There are dedicated tools for debugging DNS, including "host" and "dig"
> in the dnsutils package (on Debian 10 which you're using, or in bind9-host
> in Debian 11). Start with those.
>
> dig @
127.0.0.1 A pluto.sternbild.m
> host -t A pluto.sternbild.m 127.0.0.1
>
> Either of these commands will request the "A" record for pluto.sternbild.m
> from the DNS resolver at 127.0.0.1. I'm guessing that's the one you're
> trying to use and debug. You can try both and see which one you like
> better. Of the two commands, dig is the more feature-rich one, should you
> need to go into more detail.
> Since you have two other nameserver lines, you don't know which one(s)
> are returning the NXDOMAIN error, you might want to probe all three with
> dig or host.
first let me thanks for you quick answer, thanks!
i see and understod, i have now only search sternbild.m, and 127.0.0.1,
on resolv.conf
please see me result
# dig @
127.0.0.1 A pluto.sternbild.m
; <<>> DiG 9.11.5-P4-5.1+deb10u8-Debian <<>> @
127.0.0.1 A pluto.sternbild.m
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 7559
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 46f08b6124e3fe216e3fe97663c99d8e691938f0921a7d42 (good)
;; QUESTION SECTION:
;pluto.sternbild.m. IN A
;; AUTHORITY SECTION:
. 10699 IN SOA
a.root-servers.net.
nstld.verisign-grs.com.
2023011901 1800 900 604800 86400
;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Thu Jan 19 20:44:14 CET 2023
;; MSG SIZE rcvd: 146
-
# host -t A pluto.sternbild.m 127.0.0.1
Using domain server:
Name: 127.0.0.1
Address: 127.0.0.1#53
Aliases:
Host pluto.sternbild.m not found: 3(NXDOMAIN)
-
# cat /etc/resolv.conf
search sternbild.m
nameserver 127.0.0.1
-
ok see that systemd-resolveconf are running, ok stoped!
# netstat -plnt | grep ':53'
tcp 0 0
0.0.0.0:5355 0.0.0.0:* LISTEN
32075/systemd-resol
tcp 0 0
127.0.0.1:53 0.0.0.0:* LISTEN
17207/named
tcp 0 0
127.0.0.53:53 0.0.0.0:* LISTEN
32075/systemd-resol
tcp6 0 0 :::5355 :::* LISTEN
32075/systemd-resol
tcp6 0 0 :::53 :::* LISTEN 17207/named
# systemctl stop systemd-resolved.service
# netstat -plnt | grep ':53'
tcp 0 0
127.0.0.1:53 0.0.0.0:* LISTEN
17207/named
tcp6 0 0 :::53 :::* LISTEN 17207/named
-
bind are restarted and running
# systemctl status bind9
● bind9.service - BIND Domain Name Server
Loaded: loaded (/lib/systemd/system/bind9.service; enabled; vendor
preset: enabled)
Active: active (running) since Thu 2023-01-19 21:09:12 CET; 4s ago
Docs: man:named(8)
Process: 17455 ExecStart=/usr/sbin/named $OPTIONS (code=exited,
status=0/SUCCESS)
Main PID: 17456 (named)
Tasks: 5 (limit: 2358)
Memory: 12.3M
-
but no answer
# ping pluto
ping: pluto: Name or service not known
# ping pluto.sternbild.m
ping: pluto.sternbild.m: Name or service not known
--