**VIDEO GUIDE** How to setup up a Pihole docker container for network wide adblocking **


50 posts in this topic Last Reply

Recommended Posts

5 hours ago, WashingtonMatt said:

So that's showing you that your windows device is using a ipv6 dns server 2601:640... It should be your pi-hole ipv4 address .You need to check your dhcp server dns settings. Make sure it's only configured to hand out your pihole address.

Okay, resolved that issue by going into my router's IPv6 settings and turning it off. 

Now that brings me to a big question. Am i losing anything by turning IPv6 off on my router.

 

If it is deemed as something I should have on. How would I go about receiving the IPv6 address for my pi-hole?

Link to post
  • 2 weeks later...
  • 2 weeks later...

I have setup the docker as described in the video.  However, I have nothing on the Domains on Blocklist.  I checked under Settings-> DNS and none of the check boxes are checked.  When I manually check the google boxes and update the Blocklist everything is pulled down.  I have 8.8.8.8  and 8.8.4.4 in the docker settings.  Any suggestions?

Link to post
  • 1 month later...
On 5/10/2019 at 4:25 PM, Drazzilb said:

I also made sure to change my DNS server for my UnRaid due to the fact i was not able to receive any updates for plugins or dockers.

image.png.987f8b46284e1d99d2dcb42f1cf3d867.png

I'm not having any problems with my unRAID server using the Pi-Hole as its primary DNS. - The only caveat was that you had to add "raw.githubusercontent.com" to your whitelist.

Link to post
8 hours ago, MarkRMonaco said:

So, it appears that ifconfig is missing from the docker's console... Any alternatives or workarounds?

 


# ifconfig
sh: 2: ifconfig: not found
# 

 

Yeah "ifconfig" is being phased out for "ip". If you just want the IP address type "ip a" or "ip help" for more information.

 

The problem with "ip" is it doesn't return anything useful when Googling. I was scratching my head like you trying to work out what happened to "ifconfig".

Link to post

Hi all, have been reading the comments. Huge shoutout and thanks to Spaceinvaderone on this video. I’m posting on here to avoid duplicate threads but I realize this thread is somewhat old. I’m having some issues to get PiHole to work consistently. 

 

I followed the video to a T and noticed that the docker works, albeit inconsistently. I first tried to manually set my DNS server on my router. I am using a netgear XR500 with the DumaOS. My internet would work briefly but then it would freeze across all my devices. When this would happen i wouldn’t even have the chance to access my router Web GUI or the unraid GUI. It wouldn’t only fix after power cycle my router and then quickly log in and change router back to DNS from my ISP. 

 

I then read read the YouTube comments, tried the changes suggested (change network settings DNS to static and to the google DNS addresses). I tried to give my router 2 DNS addresses (one being PiHole and one being my ISP’s address), tried setting PiHole as my DHCP. Sadly I’m not able to get my internet working consistently with PiHole (would always have DNS errors) and I also noticed (that when it was working) that my internet seemed to be slower (my speed is 1000/800 and I was barely getting 45mbps on Speedtest.com). Finally I looked at it possibly being a server load issue (I regularly use handbrake in my 8 code i7 6700 in 2 docker instances, Plex, make mkv, deluge). I tried CPU pinning handbrake to only 25% for each running instance, I tried even just running PiHole alone with no other high intensity dockers. Sadly I’m not getting anything consistent. Lastly I tried setting my DNS manually on each of my client devices (like my PC

 

Am am wondering if anyone here can help guide me on properly. Appreciate any advice. 

 

At this poijt here is what my settings are:

 

1. PiHole setup on a unique static IP. I have not forwarded any special

ports on my DHCP server (xr500)

 

2. Network settings on unraid set to static DNS with the google DNS servers. *should I change this back

to the IP of my Router? Saw on a post that i should change it to the Google DNS servers. 

 

3. PiHole is running on a system that also has Plex and OpenVPN. Both Plex and open VPN have their ports forwarded. 

 

4. My other intense CPU dockers are pinned to limit

overall CPU usage to 25% (don’t feel like I need handbrake to be running that fast). I have other dockers that I feel use negligible cpu like deluge, duckdns, PiHole and these are all unpinned. 

Edited by nlink0714
Clarification and current state
Link to post
  • 2 weeks later...
  • 1 month later...

Hi All.

 

Not sure if this is the right place to ask this question but i am stuck with an issue with Pihole/unraid/pfsense and hoped you may help.

 

So decided to give Pihole a try and so far on all normal clients (NonVPN routed) all is working well.

 

My problem lies with my unraid server.. so my set-up is as follows

 

Pfsesne --> Unraid Server (IP for Unraid server in PFsense is set-up to go through VPN gateway)

Pfsense --> all other clients run through my normal external IP

 

So my problem is I have set-up the PiHole docker and all the clients on that are not running through VPN client work just fine.... BUT my unraid server cannot get to the internet (remeber its set-up in PFsense to go soley through the VPN gateway)

 

I know this maybe a pfsense issue but anyone have any idea how to resolve this?

 

If i look in the network settings of unraid it shows the Pihole ip as the dns server.. I have also tried updating the static mapping of the server in pfsense and changed the dns server in there to the pihole IP but that does not seem to work either..

 

what am i missing?

I have the firefox docker installed and it cant resolve any websites.

Link to post

ok so 5 minute update:

 

so if I go into network settings in unraid and change dns to manual and add pihole ip as the first dns server internet does not work.

 

BUT if i then put a secondary server of say 1.1.1.1 internet comes back up.. so why is unraid not seeing the pihole ip as a DNS server?

Link to post

Hi guys I got an issue I am hoping someone can help me with. 

 

I followed SpaceInvaders tutorial and all went smoothly and Pi Hole is setup on my unRaid Server. Now my issue lies with Plex. 

 

For some reason when Pi Hole is on all the thumbnails (such as cast thumbnails etc) in Plex take FOREVER to load. Now when I disable Pi Hole completely then everything loads up very quickly. I originally thought it may have been a blacklist that was causing an issue so I removed everything and done a fresh install of Pi Hole (with the default lists) and the images still take forever to load. Checking in Network and nothing seems to be blocked from Pi Hole regarding PLEX.

 

It just seems like traffic speed is crippled? I am using 1.1.1.1 - 1.0.0.1 as my DNS in Pi Hole. Everything else on my network is working and loading fast as usual, it is only PLEX that is the issue.

Link to post

Here is a video demostration of what is going on. The first part of the video is with the Pi Hole DNS completely off my Router (Pi Hole is off then) as you can see everything loads instantaneously. 

 

Now the second half I add my Pi Holes's DNS into my Router, reboot etc, and look at how slow all the images are loading. This happens on PLEX on every device on the network. It is like the speeds are crippled into the Kbps. When the Pi Hole DNS is removed and I check my bandwidth when images are loaded it ranges between 6Mbps-40Mbps.  

Link to post
  • 3 months later...

Hey guys,

i followed the guide from SpaceInvader, here and there are a few hickups to feel compared to an AdBlock extension but i can live with that.

What i cant live with is that i setup'd it like in the video with DNS via DHCP over my router and the DNS address to my docker container and the unRAID server cant resolve any internet domains anymore, the resolv.conf states my DNS is right, but i cant do anything with unRAID in that state. 

 

Any ideas? I really thought it wouldnt matter that much that unRAID tries at bootup to get a DNS when the container isnt started yet but now, nothing is working.

Regards.

Link to post
4 minutes ago, jammsen said:

unRAID server cant resolve any internet domains anymore

It is not clear from your post, but, did you set the unRAID DNS to the IP address of Pihole (not recommended) , or, are you saying that even with the DNS for unRAID set to something other than the Pihole IP address that unRAID cannot resolve domains until the Pihole docker is started?

Link to post
31 minutes ago, Hoopster said:

It is not clear from your post, but, did you set the unRAID DNS to the IP address of Pihole (not recommended) , or, are you saying that even with the DNS for unRAID set to something other than the Pihole IP address that unRAID cannot resolve domains until the Pihole docker is started?

This one "did you set the unRAID DNS to the IP address of Pihole (not recommended)"

I had it for 2 weeks running with only static dns entries, not dhcp and router stuff, it worked like a charm on selected clients, but now where its in the broad, inronically the unRAID system suffers from that, i kinda think off just setting the unRAID IP settings to static and use 1.1.1.1 as DNS from unRAID, seems like a easy fix.

Edited by jammsen
Link to post
10 minutes ago, jammsen said:

This one "did you set the unRAID DNS to the IP address of Pihole (not recommended)"

I had it for 2 weeks running with only static dns entries, not dhcp and router stuff, it worked like a charm on selected clients, but now where its in the broad, inronically the unRAID system suffers from that, i kinda think off just setting the unRAID IP settings to static and use 1.1.1.1 as DNS from unRAID, seems like a easy fix.

Yes, set your unRAID DNS in Settings --> Network Settings to some third party DNS (Google - 8.8.8.8/8.8.4.4, Cloudflare - 1.1.1.1/1.0.0.1, etc) or to the IP address of your router is you want to use your ISP's DNS. 

 

There is no reason why unRAID needs to go through Pihole as the DNS.  You want Pihole set as the DNS in the router so connected clients use it, but, unRAID should use a DNS other than Pihole.

Link to post
  • 4 months later...
On 8/31/2019 at 2:34 AM, z0ki said:

Hi guys I got an issue I am hoping someone can help me with. 

 

I followed SpaceInvaders tutorial and all went smoothly and Pi Hole is setup on my unRaid Server. Now my issue lies with Plex. 

 

For some reason when Pi Hole is on all the thumbnails (such as cast thumbnails etc) in Plex take FOREVER to load. Now when I disable Pi Hole completely then everything loads up very quickly. I originally thought it may have been a blacklist that was causing an issue so I removed everything and done a fresh install of Pi Hole (with the default lists) and the images still take forever to load. Checking in Network and nothing seems to be blocked from Pi Hole regarding PLEX.

 

It just seems like traffic speed is crippled? I am using 1.1.1.1 - 1.0.0.1 as my DNS in Pi Hole. Everything else on my network is working and loading fast as usual, it is only PLEX that is the issue.

Your Thumbnails should be downloaded on your array.  They shouldn't be accessing them across the internet.  Perhaps Pihole is adding some extra load on your unraid server.  Or the location where plex metadata is has too much data on it. 

 

Have you tried moving your Plex Metadata to a cache folder? This sped up my resolution of Thumbnails on all of my devices.  

Link to post

So I am trying to mess with the Ads list because I am still seeing Ads on places like Forbes.com and Amazon.

 

I added all the lists from Wally3ks Blocklist

 

https://wally3k.github.io/

 

But they are not working.  

 

Ive uploaded the logs

 

 

In the logs I see a bunch of invalid domain errors. Here are some examples:

[i] Target: http://sysctl.org/cameleon/hosts
[i] Received 20569 domains, 20569 domains invalid!
Sample of invalid domains:
- # Last updated : 2018-03-17
- 127.0.0.1 localhost
- 127.0.0.1 0.r.msn.com
- 127.0.0.1 0.start.bz
- 127.0.0.1 000dom.revenuedirect.com

[i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
[i] Received 38 domains, 3 domains invalid!
Sample of invalid domains:
- # Basic tracking list by Disconnect
- # License: GPLv3
- # Contact: support [at] disconnect.me

[i] Target: https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
[i] Received 2705 domains, 3 domains invalid!
Sample of invalid domains:
- # Ad filter list by Disconnect
- # License: GPLv3
- # Contact: support [at] disconnect.me

Music

I did some research and people are saying that "easy lists" are no longer being supported.  So how do I add them then?  Do I just add the domains in the files individually?   Or is this a different issue? 

pihole logs.txt

Edited by Armed Ferret
logs
Link to post
  • 2 months later...

Argh. Ran through the excellent tutorial and had no success. Can not access the webUI. Got the following log. Have tried setting key 5 (interface) to both eth0 and br0, no luck. Have bonded interface (active balanced 1) with bridging enabled. Docker is set up with separate IP (different from server). Any help GREATLY appreciated!

 

s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying...
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 20-start.sh: executing...
::: Starting docker specific checks & setup for docker pihole/pihole
WARNING Misconfigured DNS in /etc/resolv.conf: Two DNS servers are recommended, 127.0.0.1 and any backup server
WARNING Misconfigured DNS in /etc/resolv.conf: Primary DNS should be 127.0.0.1 (found 127.0.0.11)


nameserver 127.0.0.11
options ndots:0
Existing PHP installation detected : PHP version 7.0.33-0+deb9u8

Installing configs from /etc/.pihole...
Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
chown: cannot access '': No such file or directory
chmod: cannot access '': No such file or directory
chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
::: Pre existing WEBPASSWORD found
Using custom DNS servers: 1.1.1.1 & 1.0.0.1
DNSMasq binding to default interface: eth0
Added ENV to php:
"PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",
"ServerIP" => "192.168.15.2",
"VIRTUAL_HOST" => "192.168.15.2",
Using IPv4
::: Preexisting ad list /etc/pihole/adlists.list detected ((exiting setup_blocklists early))
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
::: Testing pihole-FTL DNS: FTL started!
::: Testing lighttpd config: Syntax OK
::: All config checks passed, cleared for startup ...
::: Docker start setup complete
::: Pre existing WEBPASSWORD found
Using custom DNS servers: 1.1.1.1 & 1.0.0.1
DNSMasq binding to default interface: eth0
Added ENV to php:
"PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",
"ServerIP" => "192.168.15.2",
"VIRTUAL_HOST" => "192.168.15.2",
Using IPv4
::: Preexisting ad list /etc/pihole/adlists.list detected ((exiting setup_blocklists early))
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
::: Testing pihole-FTL DNS: FTL started!
::: Testing lighttpd config: Syntax OK
::: All config checks passed, cleared for startup ...
::: Docker start setup complete
[✗] DNS resolution is currently unavailable
[✗] DNS resolution is currently unavailable

Link to post
  • 4 months later...

Hi all, 

 

Wondering if anyone else has experienced this issue and/or knows what may be causing it!

 

I have been running pihole in a docker on Unraid for about a year now. Recently I've found that the speed of wifi on my iPhone 12 Pro Max is greatly reduced when loading items from many places (i.e. loading Apollo feed is extremely slow). However I still get close to full speed when testing through fast.com, which has been very confusing. I'm on the latest iOS, have made sure I'm on the 5GHz band and I am definitely using pihole as my DNS. If I go into my phone settings and change DNS to say 1.1.1.1 then everything loads extremely fast again and it works perfectly. I don't see these issues on anything wired to the router. 

 

So I think I've narrowed it down to a DNS issue, but I'm not sure if it's on the device or pihole side... Has anyone seen anything similar or have ideas? Might just nuke pihole and reinstall or use adguard home if I can't get this working..

 

Thanks

Link to post
  • 1 month later...

good stuff here.  I just installed this docker.  I too tried setting the unraid dns to the pi-hole IP and found it to be way too slow.  I read here unraid should have real dns ip address.

 

I also set my router dns to pi-hole ip address.  The issue I have now is my asus router is configured to issue the dns of pi-hole ip via DHCP.  That works, but also pushes the router ip as a second dns ip address. I am looking into how to correct this so the router dhcp only issues the pi-hole dns ip.

 

I do see these errors in my unraid log, but everything seems to be working.

 

Jan 22 12:03:24 Tower kernel: igb 0000:03:00.0 eth0: mixed HW and IP checksum settings.
Jan 22 12:03:24 Tower kernel: igb 0000:04:00.0 eth1: mixed HW and IP checksum settings.

 

any ideas?

Edited by optiman
Link to post
  • 4 weeks later...

Hello All,

 

Set up the Pi-hole docker per the video, but just receiving a "Site cannot connect" message when attempting to open the webGUI. It opened the webGUI very breifly, but when i clicked login, it just gave me the "cannot connect" message again, and has sat there since.

 

Attempted to restart the container a few times but to no avail. I was trying to set my time zone (eastern time) but did not see the exact wording to use when setting up the container. I put in "Eastern Standard Time" and when it was updating the container I saw "America/New York" for tiem zone so I'm assuming it grabbed the right thing.

 

Here are the logs:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying...
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 20-start.sh: executing...
::: Starting docker specific checks & setup for docker pihole/pihole

[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
chown: cannot access '': No such file or directory
chmod: cannot access '': No such file or directory
chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
Converting DNS1 to PIHOLE_DNS_
Converting DNS2 to PIHOLE_DNS_
Setting DNS servers based on PIHOLE_DNS_ variable
::: Pre existing WEBPASSWORD found
DNSMasq binding to custom interface: br0
Added ENV to php:
"PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",

"ServerIP" => "192.168.2.88",
"VIRTUAL_HOST" => "192.168.2.88",
Using IPv4
::: Preexisting ad list /etc/pihole/adlists.list detected ((exiting setup_blocklists early))
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
::: Testing pihole-FTL DNS: FTL started!
::: Testing lighttpd config: Syntax OK
::: All config checks passed, cleared for startup ...
::: Enabling Query Logging
[i] Enabling logging...
::: Docker start setup complete
[i] Neutrino emissions detected...

[i] Using libz compression

[i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
[i] Received 60887 domains

[i] Number of gravity domains: 60887 (60887 unique domains)
[i] Number of exact blacklisted domains: 0
[i] Number of regex blacklist filters: 0
[i] Number of exact whitelisted domains: 0
[i] Number of regex whitelist filters: 0

[✓] DNS service is listening
[✓] UDP (IPv4)
[✓] TCP (IPv4)
[✓] UDP (IPv6)
[✓] TCP (IPv6)

[✓] Pi-hole blocking is enabled
Pi-hole version is v5.2.4 (Latest: v5.2.4)

AdminLTE version is v5.3.2 (Latest: v5.3.2)

FTL version is v5.6 (Latest: v5.6)

[cont-init.d] 20-start.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
Starting crond
Starting lighttpd
Starting pihole-FTL (no-daemon) as root
[services.d] done.
Stopping cron
Stopping lighttpd
Stopping pihole-FTL
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying...
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 20-start.sh: executing...
::: Starting docker specific checks & setup for docker pihole/pihole

[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
chown: cannot access '': No such file or directory
chmod: cannot access '': No such file or directory
chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
Converting DNS1 to PIHOLE_DNS_
Converting DNS2 to PIHOLE_DNS_
Setting DNS servers based on PIHOLE_DNS_ variable
::: Pre existing WEBPASSWORD found
DNSMasq binding to custom interface: br0
Added ENV to php:
"PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",

"ServerIP" => "192.168.2.88",
"VIRTUAL_HOST" => "192.168.2.88",
Using IPv4
::: Preexisting ad list /etc/pihole/adlists.list detected ((exiting setup_blocklists early))
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
::: Testing pihole-FTL DNS: FTL started!
::: Testing lighttpd config: Syntax OK
::: All config checks passed, cleared for startup ...
::: Enabling Query Logging
[i] Enabling logging...
::: Docker start setup complete
[i] Neutrino emissions detected...

[i] Using libz compression

[i] Target: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
[i] Received 60887 domains

[i] Number of gravity domains: 60887 (60887 unique domains)
[i] Number of exact blacklisted domains: 0
[i] Number of regex blacklist filters: 0
[i] Number of exact whitelisted domains: 0
[i] Number of regex whitelist filters: 0

[✓] DNS service is listening
[✓] UDP (IPv4)
[✓] TCP (IPv4)
[✓] UDP (IPv6)
[✓] TCP (IPv6)

[✓] Pi-hole blocking is enabled
Pi-hole version is v5.2.4 (Latest: v5.2.4)

AdminLTE version is v5.3.2 (Latest: v5.3.2)

FTL version is v5.6 (Latest: v5.6)

[cont-init.d] 20-start.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
Starting crond
Starting lighttpd
Starting pihole-FTL (no-daemon) as root
[services.d] done.

 

Edit: Figured it out. This was set to the same IP as another static IP on my network. Changed it, worked perfectly.

Edited by Arcaeus
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.