Block Your Ads forever – Set up Pi Hole on Your UNRAID OSJuly 25, 2021
First of all: A huge Thank You to Dave for reading this article beforehand.
Recently I came across Pi Hole - in simple terms: An AdBlocker for your whole network. The problem: I don’t have a Raspberry Pi (but I will buy one, one day) neither I have something else – but I have a boyfriend which kindly allowed me to experiment on his NAS Server (with UNRAID OS).
I’ve just wanted to share with you, how to set up your own “Adblocker” on the UNRAID OS. So let’s get started.
Setting up the docker-image
- Go to the Apps Section of your UNRAID OS
→ If needed, install Community Applications beforehand, steps are shown here
- Download the “pihole-template” Image from Spants’ Repository
- Afterwards you’ll be redirected to the Docker Container Page.
Docker is a Container Manager, you can find a good article about it here
4.Put the following Options in:
Network Type: Custom
Fixed IP Address: In here You should type in an IP out of your subnet that isn’t already in use by Your Network
→ To check if the desired IP is in the use, just go into your terminal and type in
ping <your desired-ip-address>
Container Variable: DNS1
Container Variable: DNS2
Container Variable: ServerIP Put the Fixed IP Address inhere, which You assigned beforehand
Container Variable TZ Your Timezone
This should be enough for getting the thing started!
Click Apply and you should get a confirmation message
The PiHole Admin Dashboard
After You have set up the Docker container, go to
http://<your-fixedipaddress>/admin and the PiHole Dashboard should open.
Now click on Login in the menu bar and type in “admin” as the password
Go to the DNS Tab and adjust your settings – in order to have a PiHole which is going to extract a lot of ads it is helpful to look around for some Adlists which contain the according regexes to save your nerves and time.
I don’t want to link to a specific Adlist, but you can google for “AdLists PiHole” and you’ll be able to find something very quickly. Or just take a look at this reddit thread or firebog
If you have found a suitable Adlist for you you can go to the Group Management > Adlists Tab and paste in your list link.
To make those Adlists working you have to upload them in the Section of your PiHole Dashboard and you have to go to Tools > Update Gravity to activate them.
Updating DNS Settings
To get this beautiful thing to work you need to redirect the traffic through the PiHole. In order to achieve this, you have two options
Updating Settings on individual devices
- Go to Your Network Tab and choose the according WLAN
- Set the DNS Configuration to “Manual”, delete the existing IP-addresses and add the IP-address of your Pi-Hole (the one you specified in the Docker Container Settings)
Updating Network Wide Settings
- Every Router has different settings so I won’t explain that in detail but it should be somehow like:
Go to your router settings (for example if you have a FritzBox type fritz.box in the browser) and got to the DNS Settings
where you can type in your default DNS Server and an alternative
Bonus – Set up a Cronjob for updating your Domain List every 24 hours
Go to your Unraid Terminal
docker exec -it pihole-template /bin/bash
→ Now you should be in the docker-container
→ If you get an error message like you don’t have an editor just install an editor with the command
sudo apt install vim
→ vim is just an option, you can use nano or whatever you like
Afterwards a file should appear. Press
i on your key board and type the following:
0 0 * * * pihole -g
→ i stands in vim for insert
After you have done that you press
esc and type in
→ wq stands for write quit
And that’s it! Congratulations you have an AdBlocker!
I hope I could help you to get rid of those pesky Ads. Please keep in mind that all AdBlockers come with a certain drawback – Your favorite creators’ income is also coming from putting ads on their blog or their YouTube-Video. And by using an ad blocker you are potentially risking to leave them without this income.
Hope to see you next time here,