# pihole

# Blocklists

https://www.technoy.de/lists/blocklists-fuer-pihole/

# docker-compose (1)

version: "3"

\#WebUI ohne Password: in Containerconsole diesen Befehl eingeben: pihole -a -p  
\# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/  
services:  
 pihole:  
 container\_name: pihole  
 image: pihole/pihole:latest  
 # For DHCP it is recommended to remove these ports and instead add: network\_mode: "host"  
 network\_mode: host  
\# ports:  
\# - "53:53/tcp"  
\# - "53:53/udp"  
\# - "67:67/udp" # Only required if you are using Pi-hole as your DHCP server  
\# - "80:80/tcp"  
 environment:  
 TZ: 'Europe/Berlin'  
 #TZ: 'America/Chicago'  
 # WEBPASSWORD: 'set a secure password here or it will be random'  
 # Volumes store your data between container upgrades  
 volumes:  
\- './etc-pihole:/etc/pihole'  
\- './etc-dnsmasq.d:/etc/dnsmasq.d'  
 # https://github.com/pi-hole/docker-pi-hole#note-on-capabilities  
 cap\_add:  
\- NET\_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed  
 restart: unless-stopped

# enable IPv6 (Docker)

/etc/docker/daemon.json

{ "ipv6": true, "fixed-cidr-v6": "2001:db8:1::100/64", }

Console:

$ ip -<span class="hljs-number">6</span> route add <span class="hljs-number">2001</span><span class="hljs-symbol">:db8</span><span class="hljs-symbol">:</span><span class="hljs-number">1</span><span class="hljs-symbol">:</span><span class="hljs-symbol">:/</span><span class="hljs-number">64</span> dev docker<span class="hljs-number">0</span>

$ sysctl net.ipv6.conf.default.forwarding=<span class="hljs-number">1</span>

sysctl net.ipv6.conf.all.forwarding=<span class="hljs-number">1</span>

<span class="hljs-number">service docker stop</span>

<span class="hljs-number">service docker start</span>

<span class="hljs-number">docker network create --driver bridge --ipv6 --subnet=2a01:4f8:a:b:c::/80 ipv6  
</span>

<span class="hljs-number"> docker run --rm -t --network ipv6 --ip6 '2a01:4f8:a:b:c::5' busybox ping6 -c 4 goggle.com</span>

hmm, mal testen: https://github.com/robbertkl/docker-ipv6nat#docker-container

# port 53 is already in use

# [Update: What to do if port 53 is already in use](https://discourse.pi-hole.net/t/update-what-to-do-if-port-53-is-already-in-use/52033)

<div class="ember-view" id="bkmrk-"><div class="container"><div class="title-wrapper"></div></div></div><div class="container posts" id="bkmrk-when-the-port-53-is-"><div class="row"><section class="topic-area" data-topic-id="52033" id="bkmrk-when-the-port-53-is--0"><div class="posts-wrapper"><div class="ember-view" id="bkmrk-when-the-port-53-is--1"><div class="post-stream"><div class="topic-post clearfix topic-owner regular"><article aria-label="post #1 by @Zopyrus" class="boxed onscreen-post" data-post-id="191464" data-topic-id="52033" data-user-id="26994" id="bkmrk-when-the-port-53-is--2" role="region"><div class="row"><div class="row"><div class="topic-body clearfix"><div aria-level="2" class="topic-meta-data" role="heading"><div class="post-infos"></div></div></div></div></div>  
When the Port 53 is already in Use, you can check this with this command (ubuntu):

Port 53 is being used at your host machine, that's why you can not bind 53 to host.

To find what is using port 53 you can do: `sudo lsof -i -P -n | grep LISTEN`

I'm a 99.9% sure that systemd-resolved is what is listening to port 53.

To solve that you need to edit the `/etc/systemd/resolved.conf` and uncomment DNSStubListener and change it to no, so it looks like this: `DNSStubListener=no`

After that reboot your system or restart the service with `service systemd-resolved restart`

</article></div></div></div></div></section></div></div>

# DNS-Wildcard

Login to your pi-hole and go to /etc/dnsmasq.d/  
Create a new file, lets call it 02-my-wildcard-dns.conf  
Edit the file, and add a line like this:  
address=/mydomain.lab/192.168.1.20  
Save the file, and exit the editor  
Run the command: service pihole-FTL restart