Pi-Hole und FritzBox Setup Anleitung

Hier die Infos zur beta
https://pi-hole.net/2018/03/24/help-us-beta-test-ftldns/

Falls es Probleme gibt also das Update quasi gar nicht startet dann stelle die systemsprache vom raspi auf englisch und starte ihn neu.

Hallo, bin neu hier und auch mit Pi-hole sowie raspberry.

Eigentlich hatte ich es wie Variante 2 eingestellt. Also Fritzbox macht DHCP Server. PI IP ist als lokaler DNS (ipv4 und ipv6) eingetragen und unter DNS Rebindschutz auch.

Im Pi hole sind diverse ext. DNS Server eingestellt. So geht bei mir keine lokale Adressauflösung (z.B. Fritz.box). Egal, wie die beiden Haken bei den DNS Einstellungen im pi sind.

Wenn ich nun die Fritzbox IP im pi als DNS Server ergänze, dann funktioniert die lokale Auflösung solange ich nur 2 weitere ext. DNS Server angebe. Wenn ich mehrere aktiviere, funktioniert es nur sporadisch. Ich vermute, dass der pi immer 2 Server abfragt. Wenn die Fritzbox zufällig nicht dabei ist, geht's nicht.

Meine jetzige Lösung ist: In pi nur auf Fritzbox verweisen. Vorteil: Lokale Auflösung funktioniert, Kindersicherung funktioniert, pi hole Schutz auch für Gastzugang.

Jetzt überlege ich aber, ob es andersrum nicht sinnvoller wäre? Dann müsste auch alles funktionieren. Zusätzlich würde die bessere DNS Auswahl des pi hole wirken. Denn der verteilt die Anfragen auf unterschiedliche Server, somit hat kein Anbieter die ganze Historie.

Oder doch besser die beta mit conditional forwarding und Variante 2 wie zuerst?

Auch würde ich gerne mal mit FTLDNS testen. Damit ist das doch die einzige Alternative, die mit Fritzbox funktioniert, oder?

Apropos?: Oben wurde die Anleitung Help Us Beta Test FTLDNS – Pi-hole verlinkt. Warum ist die komplett anders als Redirecting...

Welche brauche ich? Beide?

Danke.

ip6tables -A INPUT -p tcp --destination-port 443 -j REJECT --reject-with tcp-reset
ip6tables -A INPUT -p udp --destination-port 80 -j REJECT --reject-with icmp6-port-unreachable
ip6tables -A INPUT -p udp --destination-port 443 -j REJECT --reject-with icmp6-port-unreachable

Servus in die Runde. Ich habe jetzt mal eine ganz doofe Frage. Wie und wo genau muss ich diese Befehle eingeben? Wenn ich mich über Putty aufs Pi klinke und versuche, diese Befehle auszuführen, erhalte ich eine Errornachricht, dass eventuell ip6_tables aktuallisiert werden soll bzw der Kernel.

Nachtrag: Ich habe alles so ausgeführt, wie im Blogbeitrag von Firewall für Raspberry Pi mit iptabels - Michis Blog aufgeführt. Nachfolgende Fehler werden beim Ausführen des Skripts ausgegeben:

pi@raspberrypi:~ $ sudo sh /usr/local/bin/iptables.sh
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.6.0: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
modprobe: FATAL: Module ip6_tables not found in directory /lib/modules/4.14.50-v7+
ip6tables v1.6.0: can't initialize ip6tables table `filter': Table does not exist (do you need to insmod?)
Perhaps ip6tables or your kernel needs to be upgraded.

Hallo msatter,

wie lauten die genauen Befehle hierzu?
Der Versuch `

sudo apt install ip6tables-persistent

auszuführen, resultiert ebenfalls in einer Errornachricht`

Grüß Dich,

ich habe jetzt mit sudo apt install iptables und sudo apt install iptables-persistent die nötigen installationen vorgenommen. Wie muss ich nun aber die oben genannten Befehle umändern? Weder mit

ip6tables -A INPUT -p tcp --destination-port 443 -j REJECT --reject-with tcp-reset

noch mit

iptables -A INPUT -p tcp --destination-port 443 -j REJECT --reject-with tcp-reset

komme ich weiter. Mir wird lediglich das gleiche wie vorher ausgegeben:

iptables v1.6.0: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.

oder gleich nach dem shh-login mit sudo -i Root-Rechte verschaffen

Danke Euch, hat nun funktioniert!

Hallo zusammen,

mein ISP bietet keinen IPv6 Anschluss an. DIes habe ich unter https://www.wieistmeineip.de/ipv6-test/ gestest.

In der Fritzbox habe ich dann IPv6 abgeschaltet.

Trotzdem lässt pi-hole die Adressen trotzdem durch.

, , , , , , , , , , , , , , , , , , , , , , ,, , , , , , , , , , , , , , , , , , , , , , ,, , , , , , , , , , , , , , , , , , , , , ,
Bild_1
, , , , , , , , , , , , , , , , , , , , , , ,, , , , , , , , , , , , , , , , , , , , , , ,, , , , , , , , , , , , , , , , , , , , , , ,

Bild_2
, , , , , , , , , , , , , , , , , , , , , , ,, , , , , , , , , , , , , , , , , , , , , , ,, , , , , , , , , , , , , , , , , , , , , ,


, , , , , , , , , , , , , , , , , , , , , , ,, , , , , , , , , , , , , , , , , , , , , , ,, , , , , , , , , , , , , , , , , , , , , ,

Habe ich was falsch eingestellt?

Vielen Dank vorab.

Grüße
Hausmeister

IPv6 lässt sich an 2 Stellen einstellen. Unter Heimnetz/Netzwerk/Netzwerkeinstellungen für lokale IPv6 Nutzung und unter Internet/Zugangsdaten/IPv6 für Richtung Internet. Beides kann separat deaktiviert werden. Aber 1&1 bietet eigentlich Dual-stack an, also eine IPv4 und eine IPv6. Nur wenn du es abschaltet, kann der Test natürlich nicht funktionieren.

Vielen Dank für Deine Rückmeldung. :+1:

Ich habe den IPv6 Test gemacht, bevor ich dies in der Fritzbox abgeschaltet habe.

Aber selbst wenn mein ISP IPv6 anbietet, ich dies aber in Fritzbox deaktiviere, (sowohl unter Internet/Zugangsdaten/Heimnetz/IPv6 als auch unter Heimnetz/Netzwerk/Netzwerkeinstellungen/IPv6-Adressen) sollten doch keine IPv6-Adressen durch den Pihole weitergeleitet werden, oder?

Kurzum: Kein IPv6 in der Fritzbox - keine Weiterleitung. :thinking:

Grüße
Hausmeister

Ich habe auf meinem odroid pihole laufen mit unbound. Läuft auch super. Nur habe ich jetzt mitbekommen das einige die googledns 8.8.8.8 hardcoded haben und deshalb pihole dort nicht greift.

Ich habe mir jetzt in meiner fritzbox eine statische route der google dns ip auf meinen odroid gelegt. Dort möchte ich dann ganz normal auflösen. Laut Internetrecherche muss ich per iptables den port 53 öffnen das die route auch ankommt. Aber wenn ich nlslookup google.com 8.8.8.8 mache kommt nur ein ;; connection timed out; no servers could be reached.

nlslookup google.com geht da es so ganz normal von pihole aufgelöst wird.

Hier mal meine Ausgabe von iptables:
root@DietPi:~# iptables -nvL
Chain INPUT (policy ACCEPT 5598K packets, 28G bytes)
pkts bytes target prot opt in out source destination
24569 1621K f2b-emby tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 8096,8920
6308 354K f2b-dropbear tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22
6308 354K f2b-ssh tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22
6308 354K fail2ban-dropbear tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22
6308 354K fail2ban-ssh tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22
7 420 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 reject-with tcp-reset
0 0 REJECT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:80 reject-with icmp-port-unreachable
0 0 REJECT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:443 reject-with icmp-port-unreachable
3566 825K ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp spt:53

Muss ich auf port 5353 umleiten wegen unbound oder warum geht das bei mir nicht und wenn ja wie? Pihole hat bei mir 192.168.177.98 und die fritze 192.168.177.1

Ich bekomme PiHole ebenfalls nicht richtig ans laufen.
Prinzipiell werden die entsprechenden Seiten geblock, allerdings werde ich nicht auf die Blocking Landing Page weitergeleitet.

Ich nutze eine 7490 und PiHole auf einer Ubuntu 18 VM.
Der PiHole hat die IP-Adresse 192.168.XXX.3

Die FritzBox arbeitet als DHCP-Server.



rebind

Unter DNS-Rebind habe ich nun folgende eingetragen:
pi.hole
pihole.fritz.box

Dies brachte aber auch keine Besserung.

Was du hierbei genau meinst ist mir nicht ganz klar.
Wo nutze ich den die .178.1?

Ja genau. Wir haben uns nach zahlreichen und langwierigen Diskussionen für NULL Blocking entschieden. Es hat einfach wesentliche Vorteile da es vorher immer wieder aufgetretene Wartezeiten bei https:// Seiten verschwinden lässt. Da die Blockiert-Seite eh nicht auf https:// Adressen angezeigt werden kann, erschien es uns ein geringer Verlust angesichts der immer stärkeren Verbreitung von HTTPS und den schon beschriebenen Vorteilen.

1 Like

Vielen Dank. Daran hat es gelegen. Nachdem die Option IP in der pihole-FTL.conf eingetragen habe wird die Blockseite auch angezeigt.

Dann kann ich meine Anpassungen an der FritzBox auch wieder rückgängig machen.

Ich habe die pihole-FTL.conf nun wieder geleert und lebe damit das die Blockseite nicht angezeigt wird.

Was mir heute noch aufgefallen ist. Gestern hatte ich noch mehrere IPv6 Clients in der PiHole Übersicht.
Nachdem ich heute morgen über das Webinterface DNSMASQ neugestartet habe und die Log einmal gelöscht habe tauchen nun nur noch IPv4 Clients in der Übersicht auf.

Nein nicht mehr. Ich habe in der FritzBox Unique Local Addresses (ULA) immer zuweisen eingestellt.
Und über ULA-Präfix manuell festlegen meinen eigenen Präfix definiert.

Der PiHole Rechner hat hierdurch auch eine IPv6 ULA mit fe erhalten.
Die IPv6 ULA Adresse habe ich dann in der FritzBox bei Lokaler DNSv6-Server eingetragen.

Im PiHole habe ich wiederum unter DNS die neue mit fe beginnende ULA der FritzBox eingetragen.

Ich gebe es auf. Es ist einfach ein Krampf.
Ich habe nun das gesamt PiHole System in einer neuen Ubuntu 18 VM installiert.
Darauf geachtet, dass fest IPv4 also auch IPv6 Adressen vergeben werden.

Im Anschluss entsprechend wie besprochen konfiguriert.
Nun tauchen Clients sowohl mit Ihrer IPv4 als auch mit ihrer IPv6 Adresse im PiHole Webinterface auf.

Leider funktioniert das Filtern nicht zu 100%.

Testweise habe ich versucht die folgende Adresse zu blocken:

www.pornhub.com

Laut der Query List erhalte ich folgens:

Dennoch kann ich die Seite problemlos im Browser öffnen:

Dies habe ich bereits vermutet.

Mit dem RegEx Eintrag funktioniert es.

Allerdings frage ich mit dann was letztendlich der Eintrag pornhub.com ohne www in der pi_blocklist_porn_top1m.list wegfiltern soll?

In der genannten Liste sind alle eigetragenen Domains ohne www, also NAME.TLD, daher wird diese Liste wohl nicht viel bringen.

Das kommt ganz auf die Nutzer an. Ich gebe z.B. immer einfach nur google.de ein oder ebay.de usw.
Wieso sollte ich die extra Zeit für www. aufwenden wo das doch eh bei keiner guten Webseite einen Unterschied macht?

Wie gesagt, ich denke das kommt ganz auf die Nutzer an aber es wäre sinnvoll wenn diese Liste direkt beides enthalten würde.