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 -6 route add 2001:db8:1::/64 dev docker0

$ sysctl net.ipv6.conf.default.forwarding=1 

sysctl net.ipv6.conf.all.forwarding=1

service docker stop

service docker start


docker network create --driver bridge --ipv6 --subnet=2a01:4f8:a:b:c::/80 ipv6

 docker run --rm -t --network ipv6 --ip6 '2a01:4f8:a:b:c::5' busybox ping6 -c 4 goggle.com


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


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

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