Benutzer-Werkzeuge

Webseiten-Werkzeuge


tachtler:dns_unbound_archlinux

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
tachtler:dns_unbound_archlinux [2021/11/28 17:53] – [/etc/unbound/unbound.conf] klaustachtler:dns_unbound_archlinux [2022/03/31 05:32] (aktuell) – [Installation] klaus
Zeile 47: Zeile 47:
 (**__Siehe nachfolgendes Beispiel__**) (**__Siehe nachfolgendes Beispiel__**)
 <code> <code>
-# dig @127.0.0.rechner10.intra.tachtler.net +dnssec +multi+# dig @192.168.0.20 rechner10.intra.tachtler.net +dnssec +multi 
 + 
 +; <<>> DiG 9.16.23 <<>> @192.168.0.20 rechner10.intra.tachtler.net +dnssec +multi 
 +; (1 server found) 
 +;; global options: +cmd 
 +;; Got answer: 
 +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 8214 
 +;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1 
 + 
 +;; OPT PSEUDOSECTION: 
 +; EDNS: version: 0, flags: do; udp: 1232 
 +;; QUESTION SECTION: 
 +;rechner10.intra.tachtler.net. IN A 
 + 
 +;; ANSWER SECTION: 
 +rechner10.intra.tachtler.net. 10505 IN A 192.168.0.10 
 +rechner10.intra.tachtler.net. 10505 IN RRSIG A 15 4 10800 ( 
 + 20211217203021 20211130133211 10887 intra.tachtler.net. 
 + Ds49XZOZ1p87ygjVtBYPk5qZED3MmbVybLoKIc8o4KPW 
 + P4xhS3R1Z9rAWBjHMi2XGxqIn7BB403SUh1quM03CA== ) 
 + 
 +;; Query time: 0 msec 
 +;; SERVER: 192.168.0.20#53(192.168.0.20) 
 +;; WHEN: Tue Nov 30 15:38:06 CET 2021 
 +;; MSG SIZE  rcvd: 187
  
 </code> </code>
  
 :!: **HINWEIS** - **Nachfolgend muss das ''ad''-Flag in der Antwort enthalten sein, siehe nachfolgende Zeile:** :!: **HINWEIS** - **Nachfolgend muss das ''ad''-Flag in der Antwort enthalten sein, siehe nachfolgende Zeile:**
-FIXME  * '';; flags: qr rd ra'' ''**ad**''; ''QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1''+  * '';; flags: qr rd ra'' ''**ad**''; ''QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1''
  
 ===== Überblick ===== ===== Überblick =====
Zeile 71: Zeile 95:
  
 Mit nachfolgendem Befehl, wird das Pakete **''unbound''** installiert: Mit nachfolgendem Befehl, wird das Pakete **''unbound''** installiert:
 +<code>
 +# pacman --noconfirm -S unbound
 +</code> 
 +++++ Installationsverlauf |
 <code> <code>
 # pacman --noconfirm -S unbound # pacman --noconfirm -S unbound
Zeile 131: Zeile 159:
 ==> root: 11 ==> root: 11
 </code> </code>
 +++++
  
 Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket **''unbound''** installiert wurden: Mit nachfolgendem Befehl kann überprüft werden, welche Inhalte mit den Paket **''unbound''** installiert wurden:
 +<code>
 +# pacman -Qil unbound
 +</code> 
 +++++ Installierte Dateien |
 <code> <code>
 # pacman -Qil unbound # pacman -Qil unbound
Zeile 242: Zeile 275:
 unbound /usr/share/man/man8/unbound.8.gz unbound /usr/share/man/man8/unbound.8.gz
 </code> </code>
 +++++
  
 ===== Dienst/Deamon-Start einrichten ===== ===== Dienst/Deamon-Start einrichten =====
Zeile 643: Zeile 677:
  
 </code> </code>
 +
 +==== remote-control ====
 +
 +Es kann eine Kontrolle über den [[http://www.unbound.net/|unbound]] DNS-Resolver mittels dem Befehl ''unbound-control'' eingerichtet werden. Dazu ist es zunächst erforderlich, mit nachfolgendem Befehl 
 +  * ''unbound-control-setup''
 +die erforderlichen TLS-Schlüsseldateien automatisch im Standardinstallationsverzeichnis
 +  * ''/etc/unbound''
 +zu erzeugen, wie nachfolgend dargestellt:
 +<code>
 +# unbound-control-setup 
 +setup in directory /etc/unbound
 +Generating RSA private key, 3072 bit long modulus (2 primes)
 +..........................++++
 +........++++
 +e is 65537 (0x010001)
 +Generating RSA private key, 3072 bit long modulus (2 primes)
 +.....................................................................................................++++
 +....................++++
 +e is 65537 (0x010001)
 +Signature ok
 +subject=CN = unbound-control
 +Getting CA Private Key
 +removing artifacts
 +Setup success. Certificates created. Enable in unbound.conf file to use
 +</code>
 +
 +Eine Überprüfung, ob das ordnungsgemäss durchgeführt wurden, kann mit nachfolgendem Befehl durchgeführt werden:
 +<code>
 +# ls -l /etc/unbound/unbound_*
 +-rw------- 1 root root 2455 Dec 11 08:33 /etc/unbound/unbound_control.key
 +-rw-r----- 1 root root 1411 Dec 11 08:33 /etc/unbound/unbound_control.pem
 +-rw------- 1 root root 2459 Dec 11 08:33 /etc/unbound/unbound_server.key
 +-rw-r----- 1 root root 1549 Dec 11 08:33 /etc/unbound/unbound_server.pem
 +</code>
 +
 +Eine Beschreibung der möglichen Aktionen, welche mittels dem Befehl ''unbound-control'' durchgeführt werden können, gibt die ''man''-Page zum Befehl aus.
 +
 +Nachfolgend eine Beispiel, wenn die Konfiguration in ''/etc/unbound/unbound.conf'' durchgeführt wurde und der [[http://www.unbound.net/|unbound]] DNS-Resolver gestartet wurde:
 +<code>
 +# unbound-control status
 +version: 1.13.2
 +verbosity: 1
 +threads: 1
 +modules: 3 [ subnetcache validator iterator ]
 +uptime: 6 seconds
 +options: reuseport control(ssl)
 +unbound (pid 36998) is running...
 +</code>
 +
 +:!: **HINWEIS** - **Standardmäßig ist der ''unbound-control'' Service unter localhost Port 8953 zu erreichen!**
  
 ==== /etc/unbound/unbound.conf ==== ==== /etc/unbound/unbound.conf ====
Zeile 708: Zeile 792:
     auto-trust-anchor-file: "/etc/unbound/keys/K0.168.192.in-addr.arpa.+015+64298.key"     auto-trust-anchor-file: "/etc/unbound/keys/K0.168.192.in-addr.arpa.+015+64298.key"
     auto-trust-anchor-file: "/etc/unbound/keys/K0.168.192.in-addr.arpa.+015+65325.key"     auto-trust-anchor-file: "/etc/unbound/keys/K0.168.192.in-addr.arpa.+015+65325.key"
-    auto-trust-anchor-file: "/etc/unbound/keys/K171.217.88.in-addr.arpa.+015+05640.key" +    auto-trust-anchor-file: "/etc/unbound/keys/K167.171.217.88.in-addr.arpa.+015+05640.key" 
-    auto-trust-anchor-file: "/etc/unbound/keys/K171.217.88.in-addr.arpa.+015+59631.key"+    auto-trust-anchor-file: "/etc/unbound/keys/K167.171.217.88.in-addr.arpa.+015+59631.key"
     auto-trust-anchor-file: "/etc/unbound/keys/Kintra.tachtler.net.+015+02340.key"     auto-trust-anchor-file: "/etc/unbound/keys/Kintra.tachtler.net.+015+02340.key"
     auto-trust-anchor-file: "/etc/unbound/keys/Kintra.tachtler.net.+015+17796.key"     auto-trust-anchor-file: "/etc/unbound/keys/Kintra.tachtler.net.+015+17796.key"
Zeile 796: Zeile 880:
 ;; MSG SIZE  rcvd: 113 ;; MSG SIZE  rcvd: 113
 </code> </code>
 +
 +  * <code ini>remote-control:
 + control-enable: yes
 + server-key-file: "/etc/unbound/unbound_server.key"
 + server-cert-file: "/etc/unbound/unbound_server.pem"
 + control-key-file: "/etc/unbound/unbound_control.key"
 + control-cert-file: "/etc/unbound/unbound_control.pem"</code>
 +
 +Eine Kontrolle über den Befehl ''unbound-control'' soll ermöglicht werden.
  
   * <code ini>forward-zone:   * <code ini>forward-zone:
 +        name: "localhost"
 +        forward-addr: 127.0.0.1
 +forward-zone:
 +        name: "1.0.0.127.in-addr.arpa"
 +        forward-addr: 127.0.0.1
 +forward-zone:
         name: "tachtler.net"         name: "tachtler.net"
         forward-addr: 127.0.0.1         forward-addr: 127.0.0.1
Zeile 804: Zeile 903:
         forward-addr: 127.0.0.1         forward-addr: 127.0.0.1
 forward-zone: forward-zone:
-        name: "171.217.88.in-addr.arpa"+        name: "167.171.217.88.in-addr.arpa"
         forward-addr: 127.0.0.1</code>         forward-addr: 127.0.0.1</code>
  
Zeile 828: Zeile 927:
  auto-trust-anchor-file: "/etc/unbound/keys/K0.168.192.in-addr.arpa.+015+64298.key"  auto-trust-anchor-file: "/etc/unbound/keys/K0.168.192.in-addr.arpa.+015+64298.key"
  auto-trust-anchor-file: "/etc/unbound/keys/K0.168.192.in-addr.arpa.+015+65325.key"  auto-trust-anchor-file: "/etc/unbound/keys/K0.168.192.in-addr.arpa.+015+65325.key"
- auto-trust-anchor-file: "/etc/unbound/keys/K171.217.88.in-addr.arpa.+015+05640.key" + auto-trust-anchor-file: "/etc/unbound/keys/K167.171.217.88.in-addr.arpa.+015+05640.key" 
- auto-trust-anchor-file: "/etc/unbound/keys/K171.217.88.in-addr.arpa.+015+59631.key"+ auto-trust-anchor-file: "/etc/unbound/keys/K167.171.217.88.in-addr.arpa.+015+59631.key"
  auto-trust-anchor-file: "/etc/unbound/keys/Kintra.tachtler.net.+015+02340.key"  auto-trust-anchor-file: "/etc/unbound/keys/Kintra.tachtler.net.+015+02340.key"
  auto-trust-anchor-file: "/etc/unbound/keys/Kintra.tachtler.net.+015+17796.key"  auto-trust-anchor-file: "/etc/unbound/keys/Kintra.tachtler.net.+015+17796.key"
Zeile 847: Zeile 946:
 dynlib: dynlib:
 remote-control: remote-control:
 + control-enable: yes
 + server-key-file: "/etc/unbound/unbound_server.key"
 + server-cert-file: "/etc/unbound/unbound_server.pem"
 + control-key-file: "/etc/unbound/unbound_control.key"
 + control-cert-file: "/etc/unbound/unbound_control.pem"
 +forward-zone:
 +        name: "localhost"
 +        forward-addr: 127.0.0.1
 +forward-zone:
 +        name: "1.0.0.127.in-addr.arpa"
 +        forward-addr: 127.0.0.1
 forward-zone: forward-zone:
         name: "tachtler.net"         name: "tachtler.net"
Zeile 854: Zeile 964:
         forward-addr: 127.0.0.1         forward-addr: 127.0.0.1
 forward-zone: forward-zone:
-        name: "171.217.88.in-addr.arpa"+        name: "167.171.217.88.in-addr.arpa"
         forward-addr: 127.0.0.1         forward-addr: 127.0.0.1
 </code> </code>
 +
 +===== Konfigurationsdatei Überprüfung =====
 +
 +Mit nachfolgendem Befehl kann die **syntaktische Richtigkeit** der Konfigurationsdatei:
 +  * ''/etc/unbound/unbound.conf''
 +durchgeführt werden und sollte keine Meldungen ausgeben, wenn die Konfigurationsdatei **syntaktische richtig** ist:
 +<code>
 +# /usr/sbin/unbound-checkconf /etc/unbound/unbound.conf
 +unbound-checkconf: no errors in /etc/unbound/unbound.conf
 +</code>
 +
 +===== Erster Start =====
 +
 +Falls alle voranstehenden Schritte wie beschrieben durchgeführt wurden, **Installation, Basis-Konfiguration**, sollte dem **ersten Start** nichts im Wege stehen und dies mit nachfolgendem Befehl durchgeführt werden:
 +<code>
 +# systemctl start unbound.service
 +</code>
 +
 +Mit nachfolgendem Befehl kann überprüft werden, ob der erste Start erfolgreich durchgeführt wurde:
 +<code>
 +# systemctl status unbound.service
 +● unbound.service - Validating, recursive, and caching DNS resolver
 +     Loaded: loaded (/etc/systemd/system/unbound.service; enabled; vendor preset: disabled)
 +     Active: active (running) since Tue 2021-11-30 16:08:17 CET; 44s ago
 +       Docs: man:unbound(8)
 +   Main PID: 44109 (unbound)
 +      Tasks: 1 (limit: 2346)
 +     Memory: 6.7M
 +        CPU: 96ms
 +     CGroup: /system.slice/unbound.service
 +             └─44109 /usr/bin/unbound -d -p
 +
 +Nov 30 16:08:17 vml020 systemd[1]: Starting Validating, recursive, and caching DNS resolver...
 +Nov 30 16:08:17 vml020 unbound[44109]: [1638284897] unbound[44109:0] warning: IPv6 protocol not available
 +Nov 30 16:08:17 vml020 unbound[44109]: [44109:0] notice: init module 0: subnetcache
 +Nov 30 16:08:17 vml020 unbound[44109]: [44109:0] notice: init module 1: validator
 +Nov 30 16:08:17 vml020 unbound[44109]: [44109:0] notice: init module 2: iterator
 +Nov 30 16:08:17 vml020 unbound[44109]: [44109:0] info: start of service (unbound 1.13.2).
 +Nov 30 16:08:17 vml020 systemd[1]: Started Validating, recursive, and caching DNS resolver.
 +</code>
 +
 +===== Überprüfung =====
 +
 +Ziel ist es eine **lokale Antwort -->** 
 +  * **''rechner10.intra.tachtler.net IN A 192.168.0.10''** 
 +zu erhalten, welche via 
 +  - **DNSSec** abgesichert ist **__und__** 
 +  - bei der die **(DNS) Chain-of-Trust (Vertrauenskette)** 
 +im **lokalen Netzwerk** überprüfbar ist, was durch 
 +  * das **''ad''-Flag** 
 +in der Antwort bestätigt wird. 
 +
 +(**__Siehe nachfolgendes Beispiel__**)
 +<code>
 +# dig @192.168.0.20 rechner10.intra.tachtler.net +dnssec +multi
 +
 +; <<>> DiG 9.16.23 <<>> @192.168.0.20 rechner10.intra.tachtler.net +dnssec +multi
 +; (1 server found)
 +;; global options: +cmd
 +;; Got answer:
 +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36662
 +;; flags: qr rd ra ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
 +
 +;; OPT PSEUDOSECTION:
 +; EDNS: version: 0, flags: do; udp: 1232
 +;; QUESTION SECTION:
 +;rechner10.intra.tachtler.net. IN A
 +
 +;; ANSWER SECTION:
 +rechner10.intra.tachtler.net. 10800 IN A 192.168.0.10
 +rechner10.intra.tachtler.net. 10800 IN RRSIG A 15 4 10800 (
 + 20211217203021 20211130133211 10887 intra.tachtler.net.
 + Ds49XZOZ1p87ygjVtBYPk5qZED3MmbVybLoKIc8o4KPW
 + P4xhS3R1Z9rAWBjHMi2XGxqIn7BB403SUh1quM03CA== )
 +
 +;; Query time: 20 msec
 +;; SERVER: 192.168.0.20#53(192.168.0.20)
 +;; WHEN: Tue Nov 30 16:11:49 CET 2021
 +;; MSG SIZE  rcvd: 187
 +</code>
 +
 +:!: **HINWEIS** - **Nachfolgend muss das ''ad''-Flag in der Antwort enthalten sein, siehe nachfolgende Zeile:**
 +  * '';; flags: qr rd ra'' ''**ad**''; ''QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1''
  
tachtler/dns_unbound_archlinux.1638118427.txt.gz · Zuletzt geändert: 2021/11/28 17:53 von klaus