debian:other-debian:pi-hole-debian

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
debian:other-debian:pi-hole-debian [2018/11/06 15:54] – [Installation von Docker und Docker-Compose] michaeldebian:other-debian:pi-hole-debian [2018/12/04 15:21] (current) – [Installation / Deployment von Pi-hole] michael
Line 15: Line 15:
 # apt-get upgrade # apt-get upgrade
  
-# apt-get install docker+# apt-get install docker-ce
 </code> </code>
  
-''**Step 2** - Compile and install docker-compose:''<code># cd /tmp/ +''**Step 2** - Install docker-compose binary:''
-# git clone https://github.com/docker/compose.git+
  
-# cd compose +Neuste Version auf GitHub nachschauen[[https://github.com/docker/compose/releases|docker-compose]]
-# docker build -t docker-compose:armhf -f Dockerfile.armhf . +
-# docker run --rm --entrypoint="script/build/linux-entrypoint" -v $(pwd)/dist:/code/dist -v $(pwd)/.git:/code/.git "docker-compose:armhf"+
  
-ls -+<code>curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 
-# cp dist/docker-compose-Linux-armv7l /usr/local/bin/docker-compose + 
-# chmod 0755 /usr/local/bin/docker-compose+# chmod +x /usr/local/bin/docker-compose 
 +# curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
  
 # docker-compose version # docker-compose version
 </code> </code>
- 
-''**Step 3** - Install manpages for docker-compose:''<code> 
-# curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose 
-</code> 
- 
 </WRAP> </WRAP>
  
 ---- ----
  
-===== Installation eines gehärteten Unbound DNS-Server =====+===== Installation eines gehärteten Unbound DNS-Servers =====
  
 +<WRAP center box 100%>
 <code># apt-get install unbound <code># apt-get install unbound
  
Line 110: Line 104:
 # dig sigok.verteiltesysteme.net @127.0.0.1 -p 5353 # dig sigok.verteiltesysteme.net @127.0.0.1 -p 5353
 </code> </code>
 +</WRAP>
  
 ---- ----
  
-===== Vorbereitung und Deployment von Pi-hole ===== +===== Installation / Deployment von pi-hole =====
  
 <WRAP center box 100%> <WRAP center box 100%>
Line 123: Line 117:
 ---- ----
  
-''<wrap em>Optional:</wrap> blackGATE custom design aktivieren!'' <wrap hi>**Achtung:** falls das custom-design nicht gewünscht wird, die ERSTE markierte Zeile im docker_compose.yml WEGLASSEN!</wrap>+''<wrap em>Optional:</wrap> blackGATE custom design!'' <wrap hi>**Achtung:** falls das custom-design nicht gewünscht wird, die ERSTE markierte Zeile im docker_compose.yml WEGLASSEN sowie auch nachfolgende File und den Ordner nicht erstellen.</wrap>
  
 <code># mkdir /opt/docker-pihole/adminCMS <code># mkdir /opt/docker-pihole/adminCMS
Line 201: Line 195:
  
  
- +/* --------------------------- START of Default RULES (minified) -----------------------------------*/ 
-/* ---------------------------Default RULES-----------------------------------*/ +.small-box{cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.skin-blue .list-group-item:hover{background:#ddd}@-webkit-keyframes Pulse{from,to{color:#630030;-webkit-text-shadow:0 0 2px transparent}50%{color:#e33100;-webkit-text-shadow:0 0 5px #e33100}}@keyframes Pulse{from,to{color:#630030;text-shadow:0 0 2px transparent}50%{color:#e33100;text-shadow:0 0 5px #e33100}}a.lookatme{-webkit-animation-name:Pulse;animation-name:Pulse;-webkit-animation-duration:2s;animation-duration:2s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.table-responsive{-webkit-overflow-scrolling:touch}#all-queries td:nth-of-type(1),#all-queries td:nth-of-type(5){white-space:nowrap}#all-queries td:nth-of-type(3){min-width:200px;word-break:break-all;white-space:pre-wrap}#all-queries_info{white-space:unset}#all-queries_wrapper .pagination>li>a{padding-left:6px;padding-right:6px;min-width:34px;text-align:center}@media screen and (max-width:500px),screen and (min-width:767px) and (max-width:1000px){#all-queries_wrapper .pagination>li.next,#all-queries_wrapper .pagination>li.previous{display:none}#all-queries_wrapper .pagination>li:nth-of-type(2) a{border-top-left-radius:4px;border-bottom-left-radius:4px}#all-queries_wrapper .pagination>li:nth-last-of-type(2) a{border-top-right-radius:4px;border-bottom-right-radius:4px}}.main-header>.navbar{height:50px}#resetButton{color:red;font-weight:700}.vertical-alignment-helper{display:table;width:100%;height:100%;pointer-events:none}.vertical-alignment-helper>.vertical-align-center{display:table-cell;vertical-align:middle}.vertical-alignment-helper>.vertical-align-center>.modal-content{width:250px;margin-left:auto;margin-right:auto;word-wrap:break-word;pointer-events:all}.alSpinner{top:.1em;left:.1em;width:.8em;height:.8em;border-radius:50%;border:4px solid silver;border-right-color:transparent;-webkit-animation:fa-spin 1s infinite linear;animation:fa-spin 1s infinite linear} 
-.small-box { +/* --------------------------- END of Default RULES (minified) -----------------------------------*/
-        cursor: default; +
-        -webkit-user-select: none; /* Chrome/Safari */ +
-        -moz-user-select: none; /* Firefox */ +
-        -ms-user-select: none; /* IE10+ */ +
- +
-        /* Rules below not implemented in browsers yet */ +
-        -o-user-select: none; +
-        user-select: none+
-} +
-.skin-blue .list-group-item:hover { +
-        background: #ddd+
-} +
-@-webkit-keyframes Pulse{ +
-        from {color:#630030;-webkit-text-shadow:0 0 2px transparent;} +
-        50% {color:#e33100;-webkit-text-shadow:0 0 5px #e33100;} +
-        to {color:#630030;-webkit-text-shadow:0 0 2px transparent;} +
-+
-@keyframes Pulse{ +
-        from {color:#630030;text-shadow:0 0 2px transparent;} +
-        50% {color:#e33100;text-shadow:0 0 5px #e33100;} +
-        to {color:#630030;text-shadow:0 0 2px transparent;} +
-+
-a.lookatme { +
-        -webkit-animation-name: Pulse; +
-        animation-name: Pulse; +
-        -webkit-animation-duration: 2s; +
-        animation-duration: 2s; +
-        -webkit-animation-iteration-count: infinite; +
-        animation-iteration-count: infinite+
-} +
- +
-.table-responsive { +
-    -webkit-overflow-scrolling: touch+
-} +
- +
-/* Optimize Queries-Table for small screens */ +
-#all-queries td:nth-of-type(1),  /* Time column */ +
-#all-queries td:nth-of-type(5) { /* Status column */ +
-    white-space: nowrap+
-} +
-#all-queries td:nth-of-type(3) { /* Domain column */ +
-    min-width: 200px; +
-    word-break: break-all; +
-    white-space: pre-wrap+
-} +
-#all-queries_info { /* Allow Info String to wrap (useful while filtering entries on small screen) */ +
-        white-space: unset+
-} +
-#all-queries_wrapper .pagination > li > a { /* adjust the buttons width */ +
-    padding-left: 6px; +
-    padding-right: 6px; +
-    min-width: 34px; +
-    text-align: center+
-} +
-@media screen and (max-width: 500px), +
-       screen and (min-width: 767px) and (max-width: 1000px) { +
-     /* Hide "Previous" & "Next"-Buttons in Pagination */ +
-    #all-queries_wrapper .pagination > li.previous, +
-    #all-queries_wrapper .pagination > li.next { +
-        display: none+
-    } +
-    #all-queries_wrapper .pagination > li:nth-of-type(2) a { +
-        border-top-left-radius: 4px; +
-        border-bottom-left-radius: 4px+
-    } +
-    #all-queries_wrapper .pagination > li:nth-last-of-type(2) a { +
-        border-top-right-radius: 4px; +
-        border-bottom-right-radius: 4px+
-    } +
-} +
- +
-.main-header>.navbar { +
-  height: 50px+
-} +
- +
-#resetButton { +
-        color: red; +
-        font-weight: bold; +
-} +
- +
-.vertical-alignment-helper { +
-    display: table; +
-    width: 100%; +
-    height: 100%; +
-    pointer-events: none+
-} +
-.vertical-alignment-helper > .vertical-align-center { +
-    display: table-cell; +
-    vertical-align: middle+
-} +
-.vertical-alignment-helper > .vertical-align-center > .modal-content { +
-    width: 250px; +
-    margin-left: auto; +
-    margin-right: auto; +
-    word-wrap: break-word; +
-    pointer-events: all+
-} +
- +
-.alSpinner { +
-    top: 0.1em; +
-    left: 0.1em; +
-    width: 0.8em; +
-    height: 0.8em; +
-    border-radius: 50%; +
-    border: 4px solid silver; +
-    border-right-color: transparent; +
-    -webkit-animation: fa-spin 1s infinite linear; +
-    animation: fa-spin 1s infinite linear+
-}+
 </sxh> </sxh>
 +''<wrap em>END of Optional</wrap>''
 </WRAP> </WRAP>
  
  
-==== Anlegen des docker-compose files für Pi-hole ====+<WRAP center box 100%> 
 +==== Anlegen des docker-compose file für pi-hole ====
  
 Das verwendete Image ist ausschlisslich für x86_x64 Systeme geeignet. Soll Pi-hole auf einem ARM basierten System dokerisiert installiert werden, kann [[debian:other-debian:pi-hole-debian-arm|HIER]] geschaut werden.  Das verwendete Image ist ausschlisslich für x86_x64 Systeme geeignet. Soll Pi-hole auf einem ARM basierten System dokerisiert installiert werden, kann [[debian:other-debian:pi-hole-debian-arm|HIER]] geschaut werden. 
Line 323: Line 210:
 ''<wrap em>Wichtig:</wrap> Alle im **docker_compose.yml** File markierten Stellen sind zu kontrollieren oder bei einer Nichtübereinstimmung anzupassen!'' ''<wrap em>Wichtig:</wrap> Alle im **docker_compose.yml** File markierten Stellen sind zu kontrollieren oder bei einer Nichtübereinstimmung anzupassen!''
  
-<WRAP center box 100%> 
 <code># vim /opt/docker-pihole/docker_compose.yml</code> <code># vim /opt/docker-pihole/docker_compose.yml</code>
  
Line 364: Line 250:
 </sxh> </sxh>
  
-**Erklärung zu den Parametern:**+__Erklärung zu den Environment Variablen:__
   * ''**VIRTUAL_HOST**'': Die FQND von welcher später via Web-GUI auf das Pi-hole zugegriffen werden soll.   * ''**VIRTUAL_HOST**'': Die FQND von welcher später via Web-GUI auf das Pi-hole zugegriffen werden soll.
   * ''**ServerIP**'': Die Server IP-Adresse des Docker-Hosts. (Ausserhalb des Containers)   * ''**ServerIP**'': Die Server IP-Adresse des Docker-Hosts. (Ausserhalb des Containers)
   * ''**DNS1**'': Standard Upstream-DNS-Server von Pi-hole.   * ''**DNS1**'': Standard Upstream-DNS-Server von Pi-hole.
-  * +  * ''**WEBPASSWORD**'': Repräsentiert das admin-Passwort welches benötigt wird um sich am Web-GUI anzumelden. 
 +  * ''**WEB_PORT**'': Der Port auf welchem der Server das Admin-GUI ausliefert. 
 +  * ''**INTERFACE**'': Das Host-Interface. (<wrap em>Wichtig wenn Standard nicht eth0</wrap>)
 </WRAP> </WRAP>
  
  
-==== Starten und testen des Pi-hole Docker Containers ====+<WRAP center box 100%> 
 +==== Starten und testen des pi-hole Docker Containers ====
  
 <code> <code>
 # docker-compose -f /opt/docker-pihole/docker_compose.yml up -d # docker-compose -f /opt/docker-pihole/docker_compose.yml up -d
-# docker ps </code>+# docker ps -a</code> 
 +</WRAP> 
  
  
Line 391: Line 282:
 # vim /opt/docker-pihole/dnsmasq.d/01-pihole.conf # vim /opt/docker-pihole/dnsmasq.d/01-pihole.conf
 </code> </code>
 +
 +<hidden 01-pihole.conf><sxh bash;>
 +# Pi-hole: A black hole for Internet advertisements
 +# (c) 2015, 2016 by Jacob Salmela
 +# Network-wide ad blocking via your Raspberry Pi
 +# http://pi-hole.net
 +# dnsmasq config for Pi-hole
 +#
 +# Pi-hole is free software: you can redistribute it and/or modify
 +# it under the terms of the GNU General Public License as published by
 +# the Free Software Foundation, either version 2 of the License, or
 +# (at your option) any later version.
 +
 +###############################################################################
 +#      FILE AUTOMATICALLY POPULATED BY PI-HOLE INSTALL/UPDATE PROCEDURE.      #
 +# ANY CHANGES MADE TO THIS FILE AFTER INSTALL WILL BE LOST ON THE NEXT UPDATE #
 +#                                                                             #
 +#        IF YOU WISH TO CHANGE THE UPSTREAM SERVERS, CHANGE THEM IN:          #
 +#                      /etc/pihole/setupVars.conf                             #
 +#                                                                             #
 +#        ANY OTHER CHANGES SHOULD BE MADE IN A SEPERATE CONFIG FILE           #
 +#                        OR IN /etc/dnsmasq.conf                              #
 +###############################################################################
 +
 +addn-hosts=/etc/pihole/gravity.list
 +addn-hosts=/etc/pihole/black.list
 +addn-hosts=/etc/pihole/local.list
 +
 +
 +localise-queries
 +
 +
 +no-resolv
 +
 +
 +
 +cache-size=10000
 +
 +log-queries=extra
 +log-facility=/var/log/pihole.log
 +
 +local-ttl=2
 +
 +log-async
 +server=127.0.0.1#5353
 +domain-needed
 +bogus-priv
 +interface=enp1s0
 +server=/fritz.box/192.168.1.1
 +server=/1.168.192.in-addr.arpa/192.168.1.1
 +</sxh>
 +</hidden>
 +
 +----
  
 <code> <code>
 # vim /opt/docker-pihole/pihole/blacklist.txt # vim /opt/docker-pihole/pihole/blacklist.txt
 </code> </code>
 +
 +<hidden blacklist.txt><sxh plain;>
 +bvadtgs.scdn1.secure.raxcdn.com
 +4b6994dfa47cee4.com
 +metrics.plex.tv
 +gebadu.com
 +pl4518712.puserving.com
 +analytics.ff.avast.com
 +p5-3os3pimkl6tg2-ixzsvd47ghupqap6-659208-i1-v6exp3.ds.metric.gstatic.com
 +</sxh>
 +</hidden>
 +
 +----
  
 <code> <code>
 # vim /opt/docker-pihole/pihole/whitelist.txt # vim /opt/docker-pihole/pihole/whitelist.txt
 </code> </code>
 +
 +<hidden whitelist.txt><sxh plain;>
 +raw.githubusercontent.com
 +mirror1.malwaredomains.com
 +sysctl.org
 +zeustracker.abuse.ch
 +s3.amazonaws.com
 +hosts-file.net
 +serials.ws
 +www.serials.ws
 +www.googleadservices.com
 +platform.linkedin.com
 +cdn.ravenjs.com
 +public-assets.envato-static.com
 +ipm-provider.ff.avast.com
 +www.smartredirect.de
 +
 +</sxh>
 +</hidden>
 +
 +----
  
 <code> <code>
 # vim /opt/docker-pihole/pihole/setupVars.conf # vim /opt/docker-pihole/pihole/setupVars.conf
 </code> </code>
 +
 +<hidden setupVars.conf><sxh plain;>
 +DHCP_START=192.168.1.180
 +DHCP_END=192.168.1.250
 +DHCP_ROUTER=192.168.1.1
 +DHCP_LEASETIME=48
 +PIHOLE_DOMAIN=local
 +DHCP_IPv6=true
 +DHCP_ACTIVE=false
 +DNS_FQDN_REQUIRED=true
 +DNS_BOGUS_PRIV=true
 +DNSSEC=false
 +CONDITIONAL_FORWARDING=true
 +CONDITIONAL_FORWARDING_IP=192.168.1.1
 +CONDITIONAL_FORWARDING_DOMAIN=fritz.box
 +CONDITIONAL_FORWARDING_REVERSE=1.168.192.in-addr.arpa
 +PIHOLE_DNS_1=127.0.0.1#5353
 +PIHOLE_DNS_2=
 +QUERY_LOGGING=true
 +INSTALL_WEB_SERVER=true
 +INSTALL_WEB_INTERFACE=true
 +LIGHTTPD_ENABLED=
 +IPV4_ADDRESS=192.168.1.2
 +IPV6_ADDRESS=
 +WEBPASSWORD=d295e1c88d5494f1f40cce9be08428e73a79792d37f4ffa6100ac283901479aa
 +PIHOLE_INTERFACE=enp1s0
 +
 +</sxh>
 +</hidden>
 +
 +----
  
 <code> <code>
Line 411: Line 421:
  
 <WRAP center box 100%> <WRAP center box 100%>
-==== Reverse Proxy Beispiel Setup ====+==== Reverse Proxy Setup Beispiel ====
  
 <code> <code>
  • debian/other-debian/pi-hole-debian.1541516092.txt.gz
  • Last modified: 2018/11/06 15:54
  • by michael