[SUPPORT] pihole for unRaid - Spants repo


904 posts in this topic Last Reply

Recommended Posts

  • Replies 903
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

See Spaceinvader One's setup video here:        I wrote the template that pulls in the Official Docker Container from PiHole. I swapped over from my unofficial one a long

Hi, I wanted to use this pihole docker as my second dns server, i already have a hardware raspberry pi as my main pihole dns, but having a backup is always good. I was wondering how i could

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:     First make a copy of the /etc/

Posted Images

@CorneliousJD sorry I am away on business for a couple of weeks so will not be able to check. I run the log script with userscript plugin to keep the entries clear daily.

 

@ebnerjoh a couple of the config directories are exposed but not sure you can get to hosts. You could change it in the docker but will have to reinstall mods on upgrade. Also change the exit DNS to opendns instead of 8.8.8.8

 

Link to post

Editing this post with possible solution but want to leave it in case others have the same problem: I may have got this working - I manually created a blacklist.txt file in the appdata\pihole\pihole directory and Pi Hole seems to be getting a connection from my router now. I also completely wiped my appdata folder and started fresh with Docker. I think some setting files weren't getting created properly.

 

Hi All,

I seem to be having a problem with this container. I had it working and then decided I was going to see if IPv6 could be enabled. In short I broke it. After reinstalling several times fresh, I'm getting stuck. I can log into the Pi Hole admin interface but it seems to be getting stuck on dnsmasq: read/etc/pihole/gravity.list. There's also a warning about failed to load names from /etc/pihole/black.list: No such file or directory. After connecting PI hole as my dns I'm getting 0 connections in the admin console.

Here's my log:


[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...
ARCH=amd64
BASH=/bin/bash
BASHOPTS=cmdhist:complete_fullquote:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_LINENO=([0]="0")
BASH_SOURCE=([0]="/var/run/s6/etc/cont-init.d/20-start.sh")
BASH_VERSINFO=([0]="4" [1]="3" [2]="30" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu")
BASH_VERSION='4.3.30(1)-release'
CWD=/
DIRSTACK=()
DNS1=8.8.8.8
DNS2=8.8.4.4
DNSMASQ_LISTENING=all
EUID=0

)
HOME=/root
HOSTNAME=6859ee426019
HOSTTYPE=x86_64
HOST_OS=unRAID
IFS=$' \t\n'
INTERFACE=br0
IPv6=False
MACHTYPE=x86_64-pc-linux-gnu
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/opt/pihole:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PHP_ENV_CONFIG=/etc/lighttpd/conf-enabled/15-fastcgi-php.conf
PHP_ERROR_LOG=/var/log/lighttpd/error.log
PIHOLE_INSTALL=/tmp/ph_install.sh
PPID=208
PS4='+ '
PWD=/
S6OVERLAY_RELEASE=https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.2/s6-overlay-amd64.tar.gz
S6_KEEP_ENV=1
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:interactive-comments
SHLVL=1
ServerIP=192.168.1.22
TAG=debian
TCP_PORT_53=53
TCP_PORT_80=80

b
TZ=Europe/London
UDP_PORT_53=53
UID=0
WEBPASSWORD=admin
_=bash
setupVars=/etc/pihole/setupVars.conf
::: Starting docker specific setup for docker diginc/pi-hole
+ [[ admin == '' ]]
+ pihole -a -p admin admin
[✓] New password set
Using default DNS servers: 8.8.8.8 & 8.8.4.4
DNSMasq binding to custom interface: br0
Added ENV to php:
"PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",
"ServerIP" => "192.168.1.22",
"VIRTUAL_HOST" => "192.168.1.22",
Using IPv4
dnsmasq: syntax check OK.
::: Testing DNSmasq config: ::: Testing lighttpd config: Syntax OK
::: All config checks passed, starting ...
::: Docker start setup complete
Neutrino emissions detected...

Target: raw.githubusercontent.com (hosts)

Target: mirror1.malwaredomains.com (justdomains)

Target: sysctl.org (hosts)

Target: zeustracker.abuse.ch (blocklist.php?download=domainblocklist)

Target: s3.amazonaws.com (simple_tracking.txt)

Target: s3.amazonaws.com (simple_ad.txt)

Target: hosts-file.net (ad_servers.txt)

131729 domains being pulled in by gravity
108601 unique domains trapped in the Event Horizon


pihole-FTL: no process found
[✓] 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 dnsmasq
Starting crond
Starting pihole-FTL
Starting lighttpd
[services.d] done.
dnsmasq: started, version 2.72 cachesize 10000
dnsmasq: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth DNSSEC loop-detect
dnsmasq: using nameserver 8.8.4.4#53
dnsmasq: using nameserver 8.8.8.8#53
dnsmasq: read /etc/hosts - 7 addresses
dnsmasq: read /etc/pihole/local.list - 2 addresses
dnsmasq: failed to load names from /etc/pihole/black.list: No such file or directory
dnsmasq: bad name at /etc/pihole/gravity.list line 81343
dnsmasq: bad name at /etc/pihole/gravity.list line 108601
dnsmasq: read /etc/pihole/gravity.list - 108601 addresses

 

Edited by charveyunm
Link to post

Are the cron jobs still required to wipe the logs and whatnot?  I have everything up and running successfully, just want to make sure it doesn't fill up my cache drive or something when I forget to check for a long time.

 

Also I have no /boot/config/plugins/pihole directory so I assume I'm just supposed to create that and put the .cron file in there?

Link to post

I've tried using Pi-Hole three times. Once on 6.3.5, once on 6.4 and again on 6.4, but with it's own IP.

 

The problem I'm having is that 75% of time, everything is fine, but every now and again, pages just don't load. They hang and hang and refreshing the page 2 or 3 times then causes it to load?

 

Any ideas?

 

The only other thing I've noticed is that I get the following on startup and when updating the lists;

 

  [✗] DNS resolution is currently unavailable

I'm not sure why?

Link to post
On 2/4/2018 at 6:45 AM, WannabeMKII said:

I've tried using Pi-Hole three times. Once on 6.3.5, once on 6.4 and again on 6.4, but with it's own IP.

 

The problem I'm having is that 75% of time, everything is fine, but every now and again, pages just don't load. They hang and hang and refreshing the page 2 or 3 times then causes it to load?

 

Any ideas?

 

The only other thing I've noticed is that I get the following on startup and when updating the lists;

 


  [✗] DNS resolution is currently unavailable

I'm not sure why?

 

See:

https://lime-technology.com/forums/topic/48744-support-pihole-for-unraid-spants-repo/?do=findComment&comment=616611

 

As for the loading time: I wonder if it's related to one of the latest blog posts by Pi-Hole.

 

https://pi-hole.net/2018/02/02/why-some-pages-load-slow-when-using-pi-hole-and-how-to-fix-it/

 

I don't know if changes mentioned in that blog post are going to be incorporated into the docker container.

Link to post
1 hour ago, peteknot said:

 

See:

https://lime-technology.com/forums/topic/48744-support-pihole-for-unraid-spants-repo/?do=findComment&comment=616611

 

As for the loading time: I wonder if it's related to one of the latest blog posts by Pi-Hole.

 

https://pi-hole.net/2018/02/02/why-some-pages-load-slow-when-using-pi-hole-and-how-to-fix-it/

 

I don't know if changes mentioned in that blog post are going to be incorporated into the docker container.

Ah ha, 'DNS  resolution not currently available' resolved thanks to your link, appreciated!

 

As for the second section, that's gone straight over my head O.o Is this something I can do manually, or is this something that can be added to the docker?

Link to post
17 hours ago, WannabeMKII said:

Ah ha, 'DNS  resolution not currently available' resolved thanks to your link, appreciated!

 

As for the second section, that's gone straight over my head O.o Is this something I can do manually, or is this something that can be added to the docker?

 

I don't know the answer to that either. Preferably they would be baked into the docker container. I don't see why you couldn't do them manually, but don't expect them to survive an upgrade then.

Link to post
58 minutes ago, peteknot said:

 

I don't know the answer to that either. Preferably they would be baked into the docker container. I don't see why you couldn't do them manually, but don't expect them to survive an upgrade then.

To be honest, I wouldn't even know where to begin in terms of adding the info manually, especially if there's a risk of it being wiped after an update.

 

@spants, is it possible to have the required settings baked into the container for a future release?

 

I'd love to use this, as the www is getting more and more littered with ads!

Link to post

Hi guys, can you try the following to see if it speeds things up for you. I will roll it into a batch file so that you can run it after the docker is updated.

 

1. SSH to your Unraid server with pihole docker running

2. Copy and paste the following lines

docker exec -it pihole apt-get update
docker exec -it pihole apt-get --reinstall install iptables
docker exec -it pihole apt-get install iptables-persistent

docker exec -it pihole iptables -A INPUT -p tcp --destination-port 443 -j REJECT --reject-with tcp-reset
docker exec -it pihole iptables -A INPUT -p udp --destination-port 80 -j REJECT --reject-with icmp-port-unreachable
docker exec -it pihole iptables -A INPUT -p udp --destination-port 443 -j REJECT --reject-with icmp-port-unreachable

docker exec -it pihole ip6tables -A INPUT -p tcp --destination-port 443 -j REJECT --reject-with tcp-reset
docker exec -it pihole ip6tables -A INPUT -p udp --destination-port 80 -j REJECT --reject-with icmp6-port-unreachable
docker exec -it pihole ip6tables -A INPUT -p udp --destination-port 443 -j REJECT --reject-with icmp6-port-unreachable
docker exec -it pihole iptables-save > /etc/iptables/rules.v4
docker exec -it pihole ip6tables-save > /etc/iptables/rules.v6

Not sure if I need to change the "apt-get install" to "apt-get -y install" to accept the defaults - let me know...

Link to post
On 1/28/2018 at 10:09 AM, Flick said:

After I upgraded to Unraid v6.4, I moved Pi-hole to its own IP. Since then, many ads are popping up a username/password prompt rather than failing silently or showing a Pi-hole page. Any suggestions? Thank you.

 

Having the same problem as well! - I attempted the Extra Parameters option without success.

 

Including a photo

 

Unraid server is on .105 - Pihole is set to it's own IP on .106

 

 

PiHole.JPG

Link to post
7 minutes ago, spants said:

Your server ip is wrong, key 1 should be your pinhole server ip. Currently the ads are being replaced by the unraid ui hence the password prompt

Edit: Worked like a charm!

 

 

Well now I feel like an idiot! - Thank you! I'll test it now. :)

Edited by kazul
Link to post
19 hours ago, spants said:

Hi guys, can you try the following to see if it speeds things up for you. I will roll it into a batch file so that you can run it after the docker is updated.

 

1. SSH to your Unraid server with pihole docker running

2. Copy and paste the following lines


docker exec -it pihole apt-get update
docker exec -it pihole apt-get --reinstall install iptables
docker exec -it pihole apt-get install iptables-persistent

docker exec -it pihole iptables -A INPUT -p tcp --destination-port 443 -j REJECT --reject-with tcp-reset
docker exec -it pihole iptables -A INPUT -p udp --destination-port 80 -j REJECT --reject-with icmp-port-unreachable
docker exec -it pihole iptables -A INPUT -p udp --destination-port 443 -j REJECT --reject-with icmp-port-unreachable

docker exec -it pihole ip6tables -A INPUT -p tcp --destination-port 443 -j REJECT --reject-with tcp-reset
docker exec -it pihole ip6tables -A INPUT -p udp --destination-port 80 -j REJECT --reject-with icmp6-port-unreachable
docker exec -it pihole ip6tables -A INPUT -p udp --destination-port 443 -j REJECT --reject-with icmp6-port-unreachable
docker exec -it pihole iptables-save > /etc/iptables/rules.v4
docker exec -it pihole ip6tables-save > /etc/iptables/rules.v6

Not sure if I need to change the "apt-get install" to "apt-get -y install" to accept the defaults - let me know...

 

I've just run this on my install with the following output;

docker exec -it pihole apt-get update
docker exec -it pihole apt-get --reinstall install iptables
docker exec -it pihole apt-get install iptables-persistent

docker exec -it pihole iptables -A INPUT -p tcp --destination-port
443 -j REJECT --reject-with tcp-reset
docker exec -it pihole iptables -A INPUT -p udp --destination-port
80 -j REJECT --reject-with icmp-port-unreachable
docker exec -it pihole iptables -A INPUT -p udp --destination-port
443 -j REJECT --reject-with icmp-port-unreachable

docker exec -it pihole ip6tables -A INPUT -p tcp --destination-port
443 -j REJECT --reject-with tcp-reset
docker exec -it pihole ip6tables -A INPUT -p udp --destination-port
80 -j REJECT --reject-with icmp6-port-unreachable
docker exec -it pihole ip6tables -A INPUT -p udp --destination-port
443 -j REJECT --reject-with icmp6-port-unreachable
docker exec -it pihole iptables-save > /etc/iptables/rules.v4
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Get:2 http://security.debian.org jessie/updates/main amd64 Packages [608 kB]
Ign http://deb.debian.org jessie InRelease
Get:3 http://deb.debian.org jessie-updates InRelease [145 kB]
Get:4 http://deb.debian.org jessie Release.gpg [2434 B]
Get:5 http://deb.debian.org jessie Release [148 kB]
Get:6 http://deb.debian.org jessie-updates/main amd64 Packages [23.1 kB]
Get:7 http://deb.debian.org jessie/main amd64 Packages [9064 kB]
Fetched 10.1 MB in 3s (2824 kB/s)
Reading package lists... Done

Not sure if there's anywhere in particular I can look to check?

 

But I'll keep an eye on things to see how things run...

 

Thanks @spants

Link to post

I just wanted to report back 24 hours later that all is going well here with no hanging or slowdowns, which is GREAT news! Thanks!

 

A few quick questions;

 

1. If I make any changes, when I hit apply, when I open PiHole, I seem to have lost all my historical logs? Any ideas why? A docker restart doesn't do the same thing?

 

2. Off the back of that, the settings we've added in above, will they be lost with a container update?

 

3. I use a reverse proxy. I've had a play, but unable to get through to PiHole. Any ideas on how to configure with LetsEncrypt?

 

Thanks again and keep up the good work @spants

Link to post

good to hear. I will create a script that people can run when the docker is updated.

 

1. Not sure why. As mentioned before I just made the simple template, digiinc did the hard work. It might be worth checking the github for it https://github.com/diginc/docker-pi-hole. (reminds me that I need to see if the bug for debian was fixed)

2. The script will need to be run again as it modifies the docker rather than being just data

3. I dont, sorry. 

Link to post
3 hours ago, spants said:

good to hear. I will create a script that people can run when the docker is updated.

 

1. Not sure why. As mentioned before I just made the simple template, digiinc did the hard work. It might be worth checking the github for it https://github.com/diginc/docker-pi-hole. (reminds me that I need to see if the bug for debian was fixed)

2. The script will need to be run again as it modifies the docker rather than being just data

3. I dont, sorry. 

 

Great, thanks again. I'll continue to watch this thread as things progress and will keep an eye out for docker updates and scripts.

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.