Hallo zusammen.
Wir nehmen in der Schule grad DNS-Server durch und ich wollte diesen nicht nur unter Windows umsetzen sondern auch mal unter Ubuntu Server 18.04 und BIND9
Leider ist die Anleitung die sich der Dozent gemacht hat schon etwas älter und kann so nicht mehr angewendet werden weswegen ich nun an einem bestimmten Punkt feststecke. Ich habe soweit alles konfiguriert und die Auflösung funktioniert jedoch nicht so wie gewünscht/gedacht. Ich wollte testweise eine Zone namens "ramimi.local" erstellen und darin den Ubuntu DNS-Server "sv-10-002" konfigurieren. Ich kann jetzt jedoch nur "sv-10-002.local" auflösen jedoch nicht "sv-10-002.ramimi.local".
✔ Eigenrecherche
✔ Wikieintrag gelesen
✔ Besprechung mit Dozent
❌ Lösung
Zusammenfassung:
OS: Ubuntu 18.04 Server
Paket: BIND9
IP: 123.45.67.222/24
Zone: ramimi.local
Hostname: sv-10-002
Die Konfigfiles sind soweit in Ordnung (im Sinne, dass named-checkconf und named-checkzone keine Fehler zurückgeben)
Allgemeine Konfigurationen /etc/default/bind9
1 2 3 4 5 | # run resolvconf? RESOLVCONF=no # startup options for the server OPTIONS="-4 -u bind" |
/etc/bind/named.conf.options
1 2 3 4 5 6 7 | options {
version "no currently aviable";
recursion no;
allow-transfer { none; };
querylog yes;
};
|
/etc/bind/named.conf.local
1 2 3 4 5 6 7 8 9 | zone "ramimi.local" {
type master;
file "/etc/bind/db.ramimi.local";
};
zone "67.45.123.in-addr.arpa" {
type master;
file "/etc/bind/db.67.45.123";
};
|
Forwards Lookup Hier habe ich eine Frage zu localhost... Ohne den localhosteintrag funktioniert die Konfigurationsdatei nicht und bei named-checkzone erhalte ich die Fehlermeldung "Unexpected End of Input" auf Zeile 7. Woran liegt das? /etc/bind/db.ramimi.local
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | $TTL 86400
@ IN SOA sv-10-002.ramimi.local. localhost. (
0000009 ; Serial
86400 ; Refresh
864 ; Retry
604800 ; Expire
86400 ) ; TTL
; Namensserver dieser Domäne
@ IN NS sv-10-002.ramimi.local.
; A-Einträge
sv-10-002 IN A 123.45.67.222
|
Reverse Lookup /etc/bind/db.67.45.123
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ;; db.67.45.123
;; Reverselookupzone für ramimi
;;
$TTL 2D
@ IN SOA sv-10-002.ramimi.local. localhost. (
00000002 ; Serial
8H ; Refresh
2H ; Retry
4W ; Expire
2D ) ; TTL Negative Cache
@ IN NS sv-10-002.ramimi.local.
sv-10-002.ramimi.local. IN A 123.45.67.222
222 IN PTR sv-10-002.ramimi.local.
|
Syslog Im Syslog erhalte ich folgende Fehlermeldung:
1 | /etc/bind/db.67.45.123:14: ignoring out-of-zone data (sv-10-002.ramimi.local) |
ifconfig
1 2 3 4 5 6 7 8 | ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 123.45.67.222 netmask 255.255.255.0 broadcast 123.45.67.255
inet6 fe80::20c:29ff:fe98:238a prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:98:23:8a txqueuelen 1000 (Ethernet)
RX packets 7813 bytes 645448 (645.4 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7610 bytes 3236686 (3.2 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
|
Netzwerkkonfiguration /etc/netplan/50-cloud-init.yaml
1 2 3 4 5 6 7 8 9 10 11 12 13 | network:
ethernets:
ens33:
addresses:
- 123.45.67.222/24
gateway4: 123.45.67.1
nameservers:
addresses:
- 123.45.67.222
- 8.8.8.8
search:
- ramimi
version: 2
|
nslookup 123.45.67.222
1 2 3 4 5 | 222.67.45.123.in-addr.arpa name = sv-10-002. 222.67.45.123.in-addr.arpa name = sv-10-002.local. Authoritative answers can be found from: |
nslookup sv-10-002.ramimi.local
1 2 3 4 5 6 7 8 9 | textServer: 127.0.0.53 Address: 127.0.0.53#53 Non-authoritative answer: Name: sv-10-002.local Address: 123.45.67.222 Name: sv-10-002.local Address: fe80::20c:29ff:fe98:238a |
dig 123.45.67.123
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> 123.45.67.222 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 17920 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 65494 ;; QUESTION SECTION: ;123.45.67.222. IN A ;; Query time: 32 msec ;; SERVER: 127.0.0.53#53(127.0.0.53) ;; WHEN: Wed Nov 27 20:48:10 UTC 2019 ;; MSG SIZE rcvd: 42 |
dig sv-10-002.local
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ; <<>> DiG 9.11.3-1ubuntu1.11-Ubuntu <<>> sv-10-002.local ;; global options: +cmd ;; Got answer: ;; WARNING: .local is reserved for Multicast DNS ;; You are currently testing what happens when an mDNS query is leaked to DNS ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47017 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 65494 ;; QUESTION SECTION: ;sv-10-002.local. IN A ;; ANSWER SECTION: sv-10-002.local. 0 IN A 123.45.67.222 ;; Query time: 0 msec ;; SERVER: 127.0.0.53#53(127.0.0.53) ;; WHEN: Wed Nov 27 20:49:07 UTC 2019 ;; MSG SIZE rcvd: 60 |
Werden weitere Infornmationen benötigt kann ich diese gerne nachliefern. Ich danke euch schon mal im voraus für die Hilfe.
Apop85