Benutzer-Werkzeuge

Webseiten-Werkzeuge


en:howtos:pi-hole

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

en:howtos:pi-hole [2022/02/18 08:09] – Externe Bearbeitung 127.0.0.1en:howtos:pi-hole [2022/02/18 08:25] (aktuell) morquai
Zeile 1: Zeile 1:
-====== Pi-Hole Installation und Konfiguration ====== +====== Pi-Hole installation and configuration ====== 
-Wer kennt das nichtbei Google auf einen Link geklicked und schon bei einem Verkäufer gelandeteine Website aufgerufen und gefühlt Minuten gewartet bis endlich alle Werbebanner geladen sindDas muss nicht so seinWerbung muss man nicht ertragen. \\ +Who does not know thatclicked on a link on Google and ended up with a sellercalled up a website and waited what felt like minutes until all the advertising banners were finally loadedIt doesn't have to be like thatyou don't have to endure advertising. \\ 
-Die Möglichkeiten sind vielfältig und beginnen mit der Installation von Ad-Blockern im Browsermit Black Lists im RouterDabei kann man es sich auf einfach machen.... Die Werbung muss ja irgendwo herkommendies geschieht nicht wie früherwo ich in einer Zeitung ein Inserat aufgegeben habe und diese es dann veröffentlichteDamals war die Werbung Bestandteil der Zeitung und Webseiten sehen so ausals wäre die Werbung ebenfalls ihr BestandteilGlücklicherweise ist dem aber nicht sodenn die Werbung wird aus externen Quellensogenannten Werbenetzwerkenerst dann heruntergeladen wenn ihr Euch die Webseite anzeigtDadurch wird erst eine "personalisierteWerbung ermöglichtUnd damit sich der Betreiber einer Webseite nicht um den Traffic kümmern muss, den die Werbung erzeugtüberredet man den Browser diesen Part zu übernehmen. \\ +The possibilities are many and start with installing ad blockers in the browserwith black lists in the routerYou can make it easy on yourself.... The advertising has to come from somewhereit doesn't happen like it used towhere I placed an ad in a newspaper and they then published itBack thenadvertising was part of the newspaper and websites look like advertising was part of it tooFortunatelythis is not the casebecause the advertising is only downloaded from external sourcesso-called advertising networks, when you view the websiteThis is what makes "personalizedadvertising possibleAnd so that the operator of a website does not have to worry about the traffic generated by the advertisingthe browser is persuaded to take over this part. \\ 
-Und genau hier ist der Ansatzpunkt um ca. 80% aller Werbung zu verbannenDie Idee ist, alle Werbung, die nicht Bestandteil der Webseite selbst ist, gar nicht erst zu ladenNicht nur die Ladezeiten der Webseiten wird verringertim Zusammenspiel mit [[.:howtos:pivpn|PiVPN]] wird auch das mobile Datenvolumen für Inhalte, anstatt für Werbung benutzt.Darüberhinaus handelt es sich um eine zentrale Lösungdie nicht erfordert auf jedem einzelnen Gerät einen Werbeblocker einzusetzen.\\+And this is exactly where the starting point is to ban about 80% of all advertisingThe idea is to not load any ads that are not part of the website itselfNot only the loading times of the websites are reducedin combination with [[.:howtos:pivpn|PiVPN]] the mobile data volume is also used for content instead of advertisingIn additionit is a central solution that does not require on every use an ad blocker on each device.\\
 ====== Installation ====== ====== Installation ======
   curl -sSL https://install.pi-hole.net | bash   curl -sSL https://install.pi-hole.net | bash
      
-Wie bei [[.:howtos:pivpn|PiVPN]] reicht dieser eine Befehl um Pi-Hole zu installierenIm folgenden Konfigurationsdialogder sich an die automatische Installation der notwendigen Pakete anschließtwird man nach einigen Einstellungen gefragtu.a. welcher DNS (__D__omain __Name__ __S__ervice) genutzt werden sollHier hat man die Wahl entweder dein heimischen Router (sofern er DNS als Service anbietetwie die Fritz Box), den DNS des Internet Providers oderum Tracking zu verhinderneinen der [[https://www.kuketz-blog.de/dns-unzensierte-und-freie-dns-server-ohne-protokollierung|freiennicht protokoliierenden DNS Server]] einträgtIch habe mich dazu entschieden hier meine Fritz Box einzutragenFür die Einstellungendie man überlegt machen sollte, gebe ich hier meine Auswahl zum Besten+As with [[.:howtos:pivpn|PiVPN]], this one command is enough to install Pi-Hole. In the following configuration dialogwhich follows the automatic installation of the necessary packagesyou will be asked for some settingsincluding which DNS (__D__omain __Name__ __S__ervice) should be usedHere you have the choice of either your home router (if it offers DNS as a servicelike the Fritz Box), the DNS of the Internet provider orto prevent trackingone of the [[https://www.kuketz-blog.de /dns-uncensored-and-free-dns-server-without-logging|freenon-logging DNS server]]. I have decided to enter my Fritz Box hereFor the settings that you should make well-consideredI give my selection here
-  * Select Upstream DNS Provider - 192.168.178.1 (meine Fritz Box) +  * Select Upstream DNS Provider - 192.168.178.1 (my Fritz Box) 
-  * Select Protocols - hier habe ich Ipv6 abgewähltaber nur weil ich mein Provider mir kein IPv6 anbietet.  +  * Select Protocols - I deselected IPv6 herebut only because my provider doesn't offer me IPv6. 
-  * Do you want to use your current network settings as a static address? -  +  * Do you want to use your current network settings as a static address? - 
-      * Ip Address: 192.168.178.30 (IP des Raspberry Pi im Heimnetz)  +      * Ip Address: 192.168.178.30 (IP of the Raspberry Pi in the home network
-      * Gateway: 192.168.178.1 (IP der Fritz Box im Heimnetz +      * Gateway: 192.168.178.1 (IP of the Fritz Box in the home network 
-  * Do you want to log queries? - Yes, um Statistiken sehen zu könnenWer darauf verzichten möchte um die SD-Karte des Pi zu schonenkann hier auch "No" wählendies hat keinen Einfluss auf die Funktionen.+  * Do you want to log queries? - Yes to be able to see statisticsIf you want to do without it to protect the Pi's SD cardyou can also select "No" herethis has no effect on the functions.
  
-Im Laufe der Installation wird die URL des [[http://pi.hole/admin/|Web Interfaces]] angezeigt und auch das Passwort des Users admin, das ihr sicher verwahren solltet.+In the course of the installation, the URL of the [[http://pi.hole/admin/|Web Interface]] is displayed, as well as the password of the admin userwhich you should keep safe.
  
-Zu diesem Zeitpunkt ist Pi-Hole komplett funktionsfähig und einsatzbereitDie entsprechenden Dienste werden bei Starten der Raspberry Pi mitgestartetdie tägliche automatische Aktualisierung der Block Listen ist aktiviertEs sind jetzt nur noch alle Clients dazu zu überreden den Raspberry Pi als DNS zu benutzenDie einfachste Möglichkeit dies zu gewährleisten ist, auf dem heimischen Router die DHCP Einstellungen so anzupassen, das es den Raspberry Pi als DNS propagiertBei der Fritz Box findet man den Punkt unter  +At this point Pi-Hole is fully functional and ready to useThe corresponding services are started when the Raspberry Pi is startedthe daily automatic update of the block lists is activatedNow all clients have to be persuaded to use the Raspberry Pi as DNS. The easiest way to ensure this is to adjust the DHCP settings on the home router so that it propagates the Raspberry Pi as DNS. In the Fritz Box you will find the point under 
-  Heimnetz -> Netzwerk -> ReiterNetzwerkeinstellungen -> IPv4 Adressen -> FeldLokaler DNS Server+  Home network -> Network -> TabNetwork settings -> IPv4 addresses -> FieldLocal DNS server
      
-Wenn Euch das nicht gelingtoder ihr den Werbeblocker nur für einzelne Geräte nutzen wolltmüsst Ihr die DNS Einstellungen auf jedem einzelnen Gerät anpassen.+If you don't succeedor you only want to use the ad blocker for individual devicesyou have to adjust the DNS settings on each individual device.
  
-====== Konfiguration ====== +====== Configuration ====== 
-Es ist für das Blocken der Werbung nichts weiter zu konfigurierensolltet Ihr aber etwas ändern wollen kann dies entweder durch ändern der Datei /etc/pihole/setupVars.conf oder durch eine Neuinstallation geschehenWird die Datei /etc/pihole/setupVars.conf manuell geändertmüssen die entsprechenden Dienste neu gestartet werden.+There is nothing else to configure for blocking adsbut if you want to change something, you can either change the /etc/pihole/setupVars.conf file or do a new installationIf the /etc/pihole/setupVars.conf file is changed manuallythe corresponding services must be restarted.
  
   sudo service dnsmasq restart   sudo service dnsmasq restart
Zeile 44: Zeile 44:
 Apropos: in einer /etc/hosts Datei wird alles, was hinter dem Zeichen "#" steht als Kommentar interpretiert. Apropos: in einer /etc/hosts Datei wird alles, was hinter dem Zeichen "#" steht als Kommentar interpretiert.
  
 +====== For experts ======
 +You want more, e.g. because your home router does not offer DNS service or you want to redirect your own addresses? Of course, this is not a problem, because Pi-Hole uses the dnsmasq service, a small, simple DNS server, for its functions. The configuration of the DNS server can be found under /etc/dnsmasq.d/01-pihole.conf . This file contains all the information Pi-Hole needs. dsnmasq reads all files in this directory that end in .conf. I will now describe how easy it is to
 +  * naming home IPs
 +  * Redirects external addresses to internal addresses. What for? You certainly operate your own cloud in the home network in order to have data available on all devices. Of course, this cloud must also be accessible from the Internet, which means that you have to use two names for the cloud. The name in the internal network is therefore different from the name that must be used from the Internet. To avoid this, dnsmasq can redirect the external name in the home network to the internal address.
  
 +First we create our own configuration file /etc/dnsmasq.d/02-lan.conf, the content of which looks like this:
 +  
 +  addn-hosts=/etc/pihole/lan.list
 +  
 +This is a friendly way of telling dnsmasq that there is a /etc/pihole/lan.list file to consider as well. The content of this file, which we also have to create, has exactly the same structure as a [[https://wiki.ubuntuusers.de/hosts/|/etc/hosts]] file. Here's an example:
 +  
 +  192.168.178.30 raspberrypi raspberrypi.fritz.box # PI for PiHole
 +  192.168.178.40 pi3 pi3.fritz.box onkelhartwig.myfirewall.org onkelhartwig.myfirewall.org # PI for owncloud and OpenVPN client
 +  
 +As you can see, I have entered two Raspberry Pis for which dnsmasq translates the names into IP addresses (and vice versa). When I'm online, "onkelhartwig.myfirewall.org" resolves to my external IP, while at home it uses the internal IP (192.168.178.40). \\
 +Speaking of which: in an /etc/hosts file, everything after the "#" character is interpreted as a comment.
  
  
en/howtos/pi-hole.1645171795.txt.gz · Zuletzt geändert: 2022/02/18 08:09 von 127.0.0.1