Kann Internetprovider DNS Dienste blockieren?

Betschi

Software-Overclocker(in)
Hallo zusammen, ich bin gerade dabei, am Pi-Hole und Unbound rumzubasteln. Nun habe ich festgestellt, dass gewisse Webseiten "blockiert" werden je nach DNS. Mein Internetprovider ist Sunrise.
Mit Google (8.8.8.8) funktioniert alles richtig:

Code:
dig @8.8.8.8 postfinance.ch

; <<>> DiG 9.18.33-1~deb12u2-Raspbian <<>> @8.8.8.8 postfinance.ch
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28342
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;postfinance.ch. IN A

;; ANSWER SECTION:
postfinance.ch. 28 IN A 194.41.166.21

;; Query time: 19 msec
;; SERVER: 8.8.8.8#53(8.8.8.8) (UDP)
;; WHEN: Fri Mar 14 19:23:44 CET 2025
;; MSG SIZE rcvd: 59


Mit dem DNS der "Digitalen Gesellschaft"
Code:
dig @185.95.218.42 postfinance.ch
kriege ich folgenden Error:

;; communications error to 185.95.218.42#53: connection refused
;; communications error to 185.95.218.42#53: connection refused
;; communications error to 185.95.218.42#53: connection refused

; <<>> DiG 9.18.33-1~deb12u2-Raspbian <<>> @185.95.218.42 postfinance.ch
; (1 server found)
;; global options: +cmd
;; no servers could be reached

Den selben Fehler erhalte ich auch, wenn ich Unbound aktiviere. Hat jemand eine Idee, was ich noch testen könnte?
 
Unter 185.95.218.42 ist kein DNS-Server erreichbar. Das ist die Ursache.

Ergo: Anderen DNS nehmen oder selbst betreiben.
 
Die DNS-Server der "Digitale Gesellschaft (CH)" sind rein DNS-over-TLS und DNS-over-HTTPS.
Auf "klassische" DNS-Anfragen bekommst du hier also keine Antwort.

Bei dig musst du explizit angeben, dass eine "https"-Anfrage gestellt werden soll:
Code:
dig @185.95.218.42 +https postfinance.ch

Dann solltest du auch eine Antowrt bekommen.
Code:
; <<>> DiG 9.18.30-0ubuntu0.24.04.2-Ubuntu <<>> @185.95.218.42 +https postfinance.ch
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23894
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;postfinance.ch.                        IN      A

;; ANSWER SECTION:
postfinance.ch.         29      IN      A       194.41.166.21

;; Query time: 24 msec
;; SERVER: 185.95.218.42#443(185.95.218.42) (HTTPS)
;; WHEN: Mon Mar 17 10:23:12 CET 2025
;; MSG SIZE  rcvd: 59

PiHole mit DoT oder DoH als Upstream-Server hat bei mir auch immer Probleme gemacht.
Ist aber schon eine ganze Weile her, das ich das getestet hatte.

Bedenke, dass du einige Anwendungen/Browser (z.B. Firefox und generell Apple) standardmäßig DoH aktivieren, die DNS-Server des Herstellers nutzen und so die im OS konfigurierten DNS-Server ignorieren.
 
Danke für eure Antworten schonmal.
Code:
dig @185.95.218.42 +https postfinance.ch
funktioniert.

Wenn ich nun Unbound starte, und einen dig für postfinance.ch versuche, erhalte ich folgendes:
Code:
dig @127.0.0.1 -p 5335 postfinance.ch

;; communications error to 127.0.0.1#5335: timed out
;; communications error to 127.0.0.1#5335: timed out
;; communications error to 127.0.0.1#5335: timed out

; <<>> DiG 9.18.33-1~deb12u2-Raspbian <<>> @127.0.0.1 -p 5335 postfinance.ch
; (1 server found)
;; global options: +cmd
;; no servers could be reached

Mit "+https":

Code:
dig @127.0.0.1 -p 5335 +https postfinance.ch

;; Connection to 127.0.0.1#5335(127.0.0.1) for postfinance.ch failed: end of file.
;; no servers could be reached
;; Connection to 127.0.0.1#5335(127.0.0.1) for postfinance.ch failed: timed out.
;; no servers could be reached
;; Connection to 127.0.0.1#5335(127.0.0.1) for postfinance.ch failed: end of file.
;; no servers could be reached

Interessanterweise funktionieren die meisten Webseiten, gewisse Seiten wie "postfinance.ch" funktionieren nicht.
 
#5335 ist offen, und auf dem PiHole eingetragen.
Ich habe gerade gemerkt, dass wenn ich den InternetProvider DNS zusätzlich eintrage, dann klappt der Zugriff auf "postfinance.ch". An was könnte das liegen?
 
Im Pi-Hole unter Settings -> Custom DNS Servers, das sieht dann so aus:
Code:
127.0.0.1#5335
194.230.55.96

Bei den Upstream DNS Servern sind alle Haken raus.
 
Unbound soll das ja machen, dann sollte nur der dort eingetragen sein.

Unbound muss man jetzt diagnostizieren. Gibt es da Logs?
 
Ja, aber alles was ich sehe ist:
Code:
Query received on:  2025-03-18 17:54:12.706Client:   (<IP>)Query Status:  Forwarded to 127.0.0.1#5335Reply:  No reply receivedDatabase ID:  131388

und nach ein paar weiteren Versuchen

Code:
Query received on:  2025-03-18 17:54:12.711Client:  (<IP>)DNSSEC status:  INSECUREQuery Status:  Served from cacheReply:  NXDOMAINDatabase ID:  131387

Was hat es mit diesem NXDOMAIN auf sich?
 
Ist das vom Unbound?
Dann fragt der sich selbst. Der Unbound muss die IPs der Resolver haben oder selbst iterativ an der Quelle nachfragen.

NXDOMAIN kommt, wenn es eine Domain nicht im DNS gibt.
 
Vorweg: Ich bin kein Experte bei DNS.


#5335 ist offen, und auf dem PiHole eingetragen.
Ich habe gerade gemerkt, dass wenn ich den InternetProvider DNS zusätzlich eintrage, dann klappt der Zugriff auf "postfinance.ch". An was könnte das liegen?

Im Pi-Hole unter Settings -> Custom DNS Servers, das sieht dann so aus:
Code:
127.0.0.1#5335
194.230.55.96

Bei den Upstream DNS Servern sind alle Haken raus.
Wenn du im PiHole weitere Upstream DNS einträgst, wird PiHole einfach diese fragen, wenn es vom Primären keine Antwort bekommt. Der lokale unboud ist für ihn nicht erreichbar, also fragt er den Anderen.

NXDOMAIN = Non eXisting DOMAIN
Danke für eure Antworten schonmal.
Code:
dig @185.95.218.42 +https postfinance.ch
funktioniert.

Wenn ich nun Unbound starte, und einen dig für postfinance.ch versuche, erhalte ich folgendes:
Code:
dig @127.0.0.1 -p 5335 postfinance.ch

;; communications error to 127.0.0.1#5335: timed out
;; communications error to 127.0.0.1#5335: timed out
;; communications error to 127.0.0.1#5335: timed out

; <<>> DiG 9.18.33-1~deb12u2-Raspbian <<>> @127.0.0.1 -p 5335 postfinance.ch
; (1 server found)
;; global options: +cmd
;; no servers could be reached

Mit "+https":

Code:
dig @127.0.0.1 -p 5335 +https postfinance.ch

;; Connection to 127.0.0.1#5335(127.0.0.1) for postfinance.ch failed: end of file.
;; no servers could be reached
;; Connection to 127.0.0.1#5335(127.0.0.1) for postfinance.ch failed: timed out.
;; no servers could be reached
;; Connection to 127.0.0.1#5335(127.0.0.1) for postfinance.ch failed: end of file.
;; no servers could be reached

Interessanterweise funktionieren die meisten Webseiten, gewisse Seiten wie "postfinance.ch" funktionieren nicht.

Es scheint erst einmal so, als ob der unbound service nicht ordentlich funktioniert.

Code:
dig @127.0.0.1 -p 5335 +https postfinance.ch
Hier sagst du ihm ja, dass du eine DNS-over-TLS / DNS-over-HTTPS machen willst.
Dafür brauchst du ein gültiges Zertifikat für die Verschlüsselung.
 
Zuletzt bearbeitet:
Zurück