[SUPPORT] pihole for unRaid - Spants repo


Recommended Posts

On 3/27/2020 at 10:30 AM, LoOkas said:

Hey.

You should choose in the installation settings:

Network Type: Custom: br0

and enter the free IP address for your LAN in this field below:

Fixed IP address (optional):

 

 

 

Thanks for the reply, that option wasn't there for me.

 

Changing network settings require both Docker and the array to be down... and my array was in the process of building the parity. I found earlier that when shutting down the array with 2 hours (of 16) of parity building to go, it will simply restart the entire process. Wasn't going to make that mistake again ;)

 

When it was finished, turned it off, turned bridged mode off, turned it back on and... voila, there was the br0 option. Selected it, worked like a charm the first time. :)

 

No clue why it wasn't there to begin with, I haven't been messing around with the network settings.

Link to comment
  • 2 weeks later...

Why do I get this errors, how can I solve them?

 


[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+deb9u7

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

Neutrino emissions detected...

Target: dbl.oisd.nl ()

Target: raw.githubusercontent.com (adblock.txt)
[✗] Format: Adblock (list type not supported)

Number of domains being pulled in by gravity: 1094013
Number of unique domains trapped in the Event Horizon: 1094013
Number of blacklisted domains: 0
Number of regex filters: 1

[✓] DNS service is running
[✓] Pi-hole blocking is Enabled
[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.

 

 

 

EXTRA PARAMETERS: --cap-add=NET_ADMIN --dns 127.0.0.1 --dns 9.9.9.9  --restart=unless-stopped

 

imagen.thumb.png.3f74e7361df1ef5fe1394e618091e0c9.png

imagen.thumb.png.46530f33ce24ed42d685d6fdeebbe35d.png

Link to comment
  • 2 weeks later...
On 1/18/2020 at 5:40 PM, frakman1 said:

I just wanted to share a trick I used to have hostnames show up in the Pihole Dashboard for my local devices instead of IP addresses. Like this:

 

<image removed>

 

First make a copy of the /etc/hosts file in the PiHole container and place it in the app data folder on the host where you can modify it to suit your local LAN.

Then I just added a volume mount via the docker template page to link the two files

 

<image removed>

This worked brilliantly, thank you!
Now I just need an easy way to sort out the hostname that PiHole shows for itself in the dashboard and I will be sorted! :)

 

Edit: Spoke to soon! Every device on the network is going through PiHole just fine, however all the other Docker Containers + UnRaid are unable to get an internet connection. Anyone able to assist? I thought I had setup the network settings and custom: br0 correctly...

* Unraid Server is: 192.168.0.25
* PiHole Docker is: 192.168.0.10


2113056132_ScreenShot2020-04-23at2_06_03pm.thumb.png.5d94af0d50d79b43384775c0dd5fdde1.png

 

151075140_ScreenShot2020-04-23at2_06_27pm.thumb.png.e5eb20ca2f4161d52610dad322001bd6.png

 

1237256951_ScreenShot2020-04-23at2_10_08pm.thumb.png.c5fb9b8c1ed80df27e019c4f50e8c212.png

Edited by Mattyfaz
Link to comment
3 hours ago, Mattyfaz said:

Edit: Spoke to soon! Every device on the network is going through PiHole just fine, however all the other Docker Containers + UnRaid are unable to get an internet connection. Anyone able to assist? I thought I had setup the network settings and custom: br0 correctly...

Well, the only thing I saw different in your Docker configuration was that my INTERFACE variable is set to eth0 and yours was br0. Try changing that:

 

image.png.2db69aaf59a6d6338e75a5e0b002d0ff.png

 

  • Thanks 1
Link to comment

Hello,

 

I've setup Pihole in docker an all is working fine.

Problem I run into is that my network is proxied and Pihole can't seem to update the blocklist without proxy settings.

Could anybody tell me how I would configure the proxy settings for Pihole ?

 

Best regards,

 

jos

Link to comment

Another guide followed and another successful and easy installation.  Thanks to @SpaceInvaderOne and @spants for helping to make that happen.

 

I did do a few extra things which made the setup a bit more seamless:

 

- Decided to set static DNS entries for unRAID to Google DNS to avoid issues with boot up and the unRAID call home "feature" (this works great for my setup as most of my dockers have their own IP and therefore get their DNS set automatically by the router (which is Pihole) - the only exceptions to that are the services which run on either host, proxynet, or br0 - which are few.

- Set unRAID to have a static IP as apposed to DHCP reserved to try and prepare to avoid any future DHCP / DNS complications.

- Set 'Use Conditional Forwarding' in the Advanced DNS settings of Pihole to my router as my router is still the DHCP server and also stores the local domain, reserved ip assignments and hostname settings. Works great - all my LAN hosts still resolve.

- Updated the blocklist with everything here (https://firebog.net) with a "tick" so as to not interrupt the browsing experience as well as updating the whitelist with the suggestions at that link too.

 

What a great piece of software.

 

P.S. I did find that I had to change my nextcloud settings (and will have to with any other services which run on unRAID that don't have their own IP) of my mariadb hostname to the IP address of the docker as unRAID was no longer getting its dns from the router and couldn't resolve the local dns hostname.

Edited by danioj
Link to comment
Just now, Haugi said:

Hi,

 

when PiHole runs. unraid is unable to get updates for the OS / Plugin`s and the App store. As soon as i stop pihole all works. Can someone tell me wich adresses i need to wihtelist?

 

Thx

 

I am not sure on your setup BUT I have pihole setup with the default blocklists as well as a great deal more. I have just tried to update a plugin and it worked fine.  

 

If you have setup pihole with its own IP AND you don't have the advanced docker option checked which allows for the "Host to communicate with custom networks" then I am going to guess that your issue relates to your unRAID server not being able to use pihole as a DNS server and therefore resolve the address that is used for updates.

 

Assuming I am right, you should add DNS servers - say Googles (1.1.1.1 and 1.0.0.1) - to your network config, meaning independent to your pihole setup, unRAID can always resolve addresses it needs to resolve whether the container is started or not.  To me that is a no brainer as there is nothing unRAID does you would wan to block.  In fact, you should do this anyway otherwise when you go to restart unRAID (when the container is not started) then it is not going to be able to do its network call home thing that it does (assuming it still does that) meaning you might not even be able to start the server.

 

  • Thanks 1
Link to comment

I have been running this container for quite a while, never any problems.

Until I started using VMs on unraid. The VM manger seems to have its own DHCP server and possibly name server.

It starts before the pihole container and when pihole tries to bind port 67 (DHCP), it fails because the VM manager is already binding it to 0.0.0.0

 

what solutions are viable? (except for not using VMs, I need that feature now)

 

Link to comment
On 12/30/2019 at 6:53 PM, gtosnipey said:

Has anyone seen this error? I have been running pi-hole with no problems for months, and all of a sudden I am getting this, yet pi-hole still runs properly and is actively filtering. I have made no settings changes, the only change I can think of since I last checked is the Unraid 6.8 official update. Thoughts?

 

image.thumb.png.37f0954af1e53a2ddb5a9d3db348929d.png

i have this same error, were you able to resolve it?

Link to comment

 

For those, like me, who run Asuswrt-Merlin, I found (and successfully followed) this guide from a Reddit user to setup Pihole on your network utilising this specific FW's function called "DNSFilter".

 

Paraphrased from a section of the post:

 

It will force all LAN DNS requests back to the router's settings in LAN, with your Pi-hole (and unRAID in my case so as to not prevent unRAID making a successful DNS request before the container starts) as a no-filtering exception meaning any device on your network, whether it is trying to use its own DNS or not, will be forced upstream to your Pi-hole because of the DNSFilter rule.

 

 

 

 

Link to comment
On 4/27/2020 at 11:12 PM, danioj said:

P.S. I did find that I had to change my nextcloud settings (and will have to with any other services which run on unRAID that don't have their own IP) of my mariadb hostname to the IP address of the docker as unRAID was no longer getting its dns from the router and couldn't resolve the local dns hostname.

 

@danioj Pi-Hole always stopped my Nextcloud instance from working properly. Would you be willing to expand on your setup within unRAID to have Pi-Hole AND Nextcloud?

Link to comment
23 hours ago, DuffMan said:

 

@danioj Pi-Hole always stopped my Nextcloud instance from working properly. Would you be willing to expand on your setup within unRAID to have Pi-Hole AND Nextcloud?

Sure, but there is nothing novel I have done to expand on. I followed the @SpaceInvaderOne guides (noting what I have posted above) almost to the letter for a setup with my own domain name and using Cloudflare dns.  The only issue I had is when I used the Cloudflare proxy service - which I ended up turning off - but that had nothing to do with Pihole.  I also used LAN IP addresses in my config rather than local dns (e.g. x.x.x.x rather than mariadb.local.tld) so that resolution was not required. Router provides DHCP and reserves IP addys.

 

I assume you had Nextcloud working perfectly using the Letsencrypt docker before you installed Pihole?

  • Like 1
Link to comment
15 hours ago, danioj said:

I assume you had Nextcloud working perfectly using the Letsencrypt docker before you installed Pihole?

 

Yes, I followed @SpaceInvaderOne videos on YouTube and it was working well. I even got PiHole to handle my DHCP properly and also use Cloudflare in conjunction with my own domain, but when I then tried to use NextCloud, I couldn't reach it. I'll let my router handle DHCP, with appropriately reserved IPs, and make sure that Cloudflare isn't proxying. Thank you for the clarification and expansion.

I know it's lightly foolish to set myself up for a single point of failure, but I am very drawn to the idea of having one mega device that handles my home's networking, storage, and PC through unRAID. @SpaceInvaderOne, the awesome unRAID community, and unRAID itself are making this a very fun and relatively simple feat to accomplish, after getting the machine built. For now, it's been a blast working through the minor troubleshooting needed to get what I already have working together just right. I look forward to finding other useful features of the unRAID and Docker utilities as my needs change and I hope that I can help give back to the community someday.

Link to comment

Has anybody got any tips to stop Pihole from having massive impact on my SSD/Cache - I can see from other treads on Reddit that others have the same problem, if I stop the docker with Pihole the problem goes away. But in a month it has written more than 100TB - yes that number is correct. (you can see the number under main - cache - and attributes.) I would understand alot of reads, but more than 300k reads per 24 hours, thats insane. 🙂

 

Im on the newest build of both unraid and the pihole docker container.

Link to comment
19 minutes ago, Armed Ferret said:

PiHole seems to be missing from Community Applications.  All I can find is PiHole Template.  Is this docker no longer available?  Is there a way to install it through plugins? 

That is the right one, it has a slightly odd name but it’s right.

Link to comment

I ended up fixing it.  I had to do the following:

 

Bridge mode was enabled but in Settings > Docker "Host Access to custom networks" was disabled.  

 

So I needed to stop the docker service and enable that.  

Even after doing that I did not see a custom option for network adapter and when I ran the following command there was no br0 interface

 

docker network ls

 

So I did the following to rebuild the network stack

 

rm /var/lib/docker/network/files/local-kv.db (First ran this to delete the local-kv.db)

/etc/rc.d/rc.docker restart (then this restarted the docker service)

 

After that I was able to see the br0 interface. 

  • Thanks 1
Link to comment

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.