Linux dnsserver1 4.18.0-10-generic #11-Ubuntu SMP Thu Oct 11 15:13:55 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Hallo Forum,
ich habe Probleme mit der Namensauflösung mit unbound. Im LAN gibt es einen dedizierten Rechner der für die Arbeitsplatzrechner URIs auflöst. Auf dem Rechner lief vorher ubuntu Desktop 18.04 mit unbound 1.6.7, allerdings ohne TLS-Verschlüsselung. Ein Fehler im Parser für die unbound.conf hat das verhindert.
Weil ich TLS möchte, habe ich den Rechner komplett platt gemacht und mit 18.10 neu installiert. Unbound läuft auch wieder.
$ sudo systemctl status unbound.service ● unbound.service - Unbound DNS server Loaded: loaded (/lib/systemd/system/unbound.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2018-10-29 15:33:02 UTC; 1h 9min ago Docs: man:unbound(8) Process: 3886 ExecReload=/usr/sbin/unbound-control reload (code=exited, status=0/SUCCESS) Main PID: 3666 (unbound) Tasks: 1 (limit: 4507) Memory: 9.3M CGroup: /system.slice/unbound.service └─3666 /usr/sbin/unbound -d
Aber benutzen kann man unbound nur lokal:
$ dig nlnetlabs.nl ; <<>> DiG 9.11.4-3ubuntu5-Ubuntu <<>> nlnetlabs.nl ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19149 ;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;nlnetlabs.nl. IN A ;; ANSWER SECTION: nlnetlabs.nl. 2295 IN A 185.49.140.10 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Mo Okt 29 17:44:36 UTC 2018 ;; MSG SIZE rcvd: 57 $
In der Konfigurationsdatei von unbound habe ich den Zugriff von allen Rechnern im Netz erlaubt
access-control: x.y.z.0/24 allow
aber auf einem Arbeitsplatzrechner sieht das jetzt so aus:
$ dig nlnetlabs.nl ; <<>> DiG 9.10.3-P4-Ubuntu <<>> nlnetlabs.nl ;; global options: +cmd ;; connection timed out; no servers could be reached user@WS-UB-03:~$
Vorher hat das funktioniert. Ich kann zwar die Anfragen aus dem LAN im Journal des unbound-Rechners sehen, aber die aufgelösten Adressen werden im LAN nicht weitergegeben, d. h. sie kommen bei den anfragenden Rechnern nicht an. Die firewalls sind aus.
Woran liegt das?
Hier die unbound.conf
server: # chroot: "/etc/unbound" username: "unbound" directory: "/etc/unbound" port: 53 do-ip4: yes do-ip6: no do-tcp: yes do-udp: no tls-cert-bundle: /etc/ssl/certs/ca-certificates.crt interface: 0.0.0.0 interface-automatic: yes # Zugriff aus dem gesamten LAN access-control: x.y.z.0/24 allow # liegt in /etc/unbound root-hints: "root.hints" prefetch: yes use-caps-for-id: yes statistics-interval: 600 statistics-cumulative: yes hide-identity: yes hide-version: yes verbosity: 2 forward-zone: name: "." forward-tls-upstream: yes forward-addr: 146.185.167.43@853#dot.securedns.eu forward-addr: 185.49.141.37@853#getdnsapi.net forward-addr: 89.233.43.71@853#unicast.censurfridns.dk
Hier die Ausgaben zu den pings:
$ ping -c 2 $(ip -4 route show default | grep -o '[0-9]*[.][.0-9]*' ) PING x.y.z.2 (x.y.z.2) 56(124) bytes of data. --- x.y.z.2 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 22ms $ ping -c 2 213.95.41.4 PING 213.95.41.4 (213.95.41.4) 56(84) bytes of data. 64 bytes from 213.95.41.4: icmp_seq=1 ttl=54 time=28.7 ms 64 bytes from 213.95.41.4: icmp_seq=2 ttl=54 time=27.4 ms --- 213.95.41.4 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 3ms rtt min/avg/max/mdev = 27.443/28.051/28.660/0.631 ms $ ping -c 2 www.ubuntuusers.de PING ubuntuusers.de (213.95.41.4) 56(84) bytes of data. 64 bytes from ha.ubuntu-eu.org (213.95.41.4): icmp_seq=1 ttl=54 time=28.2 ms 64 bytes from ha.ubuntu-eu.org (213.95.41.4): icmp_seq=2 ttl=54 time=27.5 ms --- ubuntuusers.de ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 449ms rtt min/avg/max/mdev = 27.478/27.834/28.190/0.356 ms $
Und hier die Ausgaben zur Namensauflösung:
$ ls -l /etc/resolv.conf -rw-r--r-- 1 root root 21 Okt 29 17:09 /etc/resolv.conf $ cat /etc/resolv.conf nameserver 127.0.0.1 $ cat /etc/hosts 127.0.0.1 localhost.localdomain localhost dnsserver1 ::1 localhost6.localdomain6 localhost6 # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback fe00::0 ip6-localnet ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts $ sudo ss -pan 'sport = 53' Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port udp UNCONN 0 0 0.0.0.0:53 0.0.0.0:* users:(("unbound",pid=3666,fd=3)) tcp LISTEN 0 128 0.0.0.0:53 0.0.0.0:* users:(("unbound",pid=3666,fd=4)) $
Vielen Dank für Tipps.
Gruß, banause