You are currently viewing Pi-Hole AD blocker, DNS servers and network control

Pi-Hole AD blocker, DNS servers and network control

Probably one of the most useful tools is the Pi-Hole. Pi-Hole AD blocker, DNS server and network control, that’s what it offers!

Pi-Hole is first and foremost an AD blocker that filters all advertising that is configured. Furthermore, you can also, for example, block the communication of WINDOWS with Microsoft, for the transmission of personal data that is collected about you (also applies to Google, Apple, etc.). Fishing and a few other nasty things can also be blocked, for example.

Related articles on this topic

Pi-Hole AD blocker, DNS servers and network control (Dieser Artikel)
(incl. integrate block lists)
Pi-Hole Fix for DNS and fine-tuning
Pi-Hole regex domains block/unblock
Pi-Hole DHCP umziehen

Video Pi-Hole AD blocker, DNS servers and network control

Language: 🇩🇪
Subtitle: 🇩🇪🇬🇧

Your own DNS server

Pi-Hole is also your own DNS server that resolves domain names into IP addresses. If a domain on the Internet is blocked from the general public, you can still access it because you have your own DNS server. Of course, the prerequisite is that the site as such still exists, which is normally the case.

You can also use Pi-Hole on a notebook, single-user and when traveling. I’ll go into that in the second part. Only look in the second line to see whether you actually want to install Pi-Hole on the notebook.

Local DNS service

You can also set up your local devices, which you can access, for example, via “router.home” instead of using the IP address.

Pi-Hole runs under…

Pi-Hole runs under “Docker” and can therefore actually be set up on any PC/NAS/NB/SERVER. This applies to individual systems and networks.

“Docker”, in turn, runs on LINUX/MacOS/WINDOWS

You can find out more on the Pi-Hole homepage.

Pi Hole Installation

If you don’t use Docker yet, install “Docker” first.

If you want something simple, you can simply use “Docker Desktop”, which runs on MacOS/WINDOWS/LINUX and is easy to use.

You can download the “Docker Desktop” at https://www.docker.com/products/docker-desktop.

On Linux, the CLI version (classic)

Sudo apt install Docker
Sudo apt install Docker-Compose

Under WINDOWS

“Docker” can also be installed in the WINDOWS subsystem for Linux, just like in Linux.

On MacOS

For MacOS, please follow this link https://docs.docker.com/desktop/install/mac-install/ (starts in the middle of the document) to install “Docker” in the terminal of your Mac.


Installing Pi-Hole

Now under “Docker” we refer to setting up rather than installing. Eat it. When “Docker” is running we just need our “docker-compose.yml” to start Pi-Hole.

Docker-compose.yml file

version: "3"

# 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"
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      # - "67:67/udp" # Only required if you are using Pi-hole as your DHCP server

      - "1010:80/tcp"
    # environment:
      # TZ: 'America/Chicago'
      # WEBPASSWORD: 'set a secure password here or it will be random'

    # Volumes store your data between container upgrades
    volumes:
      - pihole-etc:/etc/pihole
      - pihole-dnsmasq.d:/etc/dnsmasq.d'
    # cap_add:
    #  - NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed

    restart: unless-stopped

volumes:
  pihole-etc:
  pihole-dnsmasq.d:

networks:
  security:
    driver: bridge

I marked 3 lines in bold/italics. You need these lines if the Pi-Hole is to work as a DHCP server. This makes sense if you use a notebook on the go. Since the IP addresses change with every WLAN hotspot, it is good for your system to have your own, fixed, IP address range. I would refrain from setting it up on a notebook that is used in many different networks with different IP address ranges. It is possible, but there are many different variables to take into account.

For DHCP use, simply remove the “#” to activate the settings.

To store our data outside of the Pi-Hole container, we use Docker volumes.

I changed the port for calling Pi-Hole from 80 to 1010. This is already in the “docker-compose.yml”. Port 80 is simply used far too often, which always causes problems.

Save the file in a directory of your choice on the hard drive. In the video I go into more detail about how you can manage it well and also find it again.

Now start a command prompt or CMD -> change to the directory to your “docker-compose.yml” file and start it with:

docker-compose up -d

After I pull the container, which can take a while, “Docker” starts the Pi-Hole automatically. If you look in the “Docker Desktop” you will have a “Security” app running. Below you will find “pihole”.

If it looks different to you, maybe something has gone wrong, please check everything again.


Configure Pi-Hole

Delete password

First, delete the Pi-Hole password to gain access. You can do this by opening a “Terminal” under the three dots in “Docker Desktop”.

The command

vial -a -p

deletes the password and you can now select port 1010/tcp under “Ports” to open the “Pi-Hole Dashboard”. UPS error? 😇

Simply add “/admin” to the address bar and the dashboard will start.

The best thing to do in this part is to follow the video. This way you can see what you should do and where.

Teleporter lists

Teleporter lists offer protection; they contain collections of fake shops, advertising, tracking and other unwanted things from the Internet.

Now it should be mentioned that loading block and teleporter lists from the Internet also poses a big risk. Pay attention to trustworthy sources when downloading and using such a list. The door swings in both directions.

I recommend the following teleporter lists which you can get from GitHub.

https://github.com/RPiList/specials#schutz-vor-fakeshops-werbung-tracking-und-anderen-attacken-aus-dem-internet

If I remember correctly, the teleporter lists come from the YouTube channel “SemperVideo”, which I can highly recommend. Greetings on the spot.

Next, add the teleporter list in the Pi-Hole under “Settings” -> “Teleporter”, now select brause, select the download of the teleporter list and click on “Restore”

Now you have to let Pi-Hole update with the lists. Then go to “Tools” and then “Update Gravity”.

Stay on this overview until the process is completed, which can take up to 5 minutes.

Redirect DNS server to Pi-Hole

The last step is to configure the DNS in your router. As a rule, you log in from your Internet browser using the router’s IP address. Then look under LAN, WLAN or network and look for DHCP settings.

Here you overwrite the Premiere DNS server with the IP address of the computer on which the Pi-Hole is running. Enter the IP address of the Pi-Hole for IPv4 and IPv6.

You can find the DNS IPv6 with the command

ipconfig /all

Search for your network card, LAN/WLAN, write down the “Link-local IPv6 address” (in German “Verbindungslocale IPv6 Adresse”)

Set the secondary DNS server to 1.1.1.1 (CloudFlare) or 8.8.8.8 (Google), or another DNS service you want to use.

Save
… and done.

I will produce a second video about Pi-Hole where we will go into the finishing touches so that everything runs perfectly.

Link to support / donation for the channel
PayPal Link
Bank transfer, Bitcoin and Lightning

#PiHole #Pi-Hole #DNSserver #AdBlocker #Docker #DockerDesktop #ITsecurity #localerDNSService #TeleporterList #BlockList

This Post Has 3 Comments

Leave a Reply