For those that want to run docker manually from SSH CLI in its native form, it works fine, I've been using it a month.
Happy to post how when I get home, it's pretty simple.
For those that want to run docker manually from SSH CLI in its native form, it works fine, I've been using it a month.
Happy to post how when I get home, it's pretty simple.
While alternatives are being discussed here, I wanted to mention that you can also run adblock on many home routers by replacing the factory firmware with OpenWRT and then installing the adblock package:
OpenWrt Project: Supported devices
Gargoyle Router Management Utility
This blocking method is perhaps not as feature rich and user friendly as PiHole or AdGuard with the nice GUI — but it does not require extra hardware and it will block the most common privacy violating trackers (DoubleClick, Google Analytics, etc.) What matters most is the quality of the block list; everything else is a matter of preference.
There is also an app called GA checker for Kodi which scans your addons for obfuscated code and references to Google Analytics.
http://redirect.superrepo.org/v7/addons/plug…cker-1.1.6a.zip
Display MoreI just installed pi-hole. Excellent piece of SW!
First I tried Linux-Server image and it worked great! I allowed me to set my own port for WebGUI (8084 in my case). I wanted to try newer version, so I uninstaled this one and go to v4.1 by following Iridium's post and punkid's one.
So, after doing:
docker pull pihole/pihole:latest
I created script file:
Code Display Moredocker run -d \ --name pihole \ --cap-add NET_ADMIN \ -p 53:53/tcp \ -p 53:53/udp \ -p 80:80 \ -e DNS1=127.0.0.1 \ -e DNS2=1.1.1.1 \ -v /etc/localtime:/etc/localtime \ -v /storage/.config/pihole/:/etc/pihole \ -v /storage/.config/pihole/dnsmasq.d/:/etc/dnsmasq.d \ -v /storage/.config/pihole/html/:/var/www/html/html/ \ -h $(cat /etc/hostname) \ -e ServerIP=$(ip route get 127.0.0.1 | awk '{ print $NF; exit }') \ -e WEBPASSWORD=654321 \ --restart=unless-stopped \ pihole/pihole:latest
And everything worked great. I accessed config page normally. Since v4 pi-hole does not come with any blacklists I decided to add some:
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
https://mirror1.malwaredomains.com/files/justdomains
http://sysctl.org/cameleon/hosts
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
https://hosts-file.net/ad_servers.txt
And that's it. Everything works.
But, one option remain problem for me. I already have multiple lighttpd servers runing on LE and in order to accomodate pi-hole I moved one to other port. I tried messing with -p option but everything except 80:80 is not working properly or at all. Any workaround is known?
Also, what about -e ServerIP? I put 127.0.0.1, but Iridium suggested 9.9.9.9 and punkid suggested 192.168.1.x. Should I use DNS address, internal host or LAN IP?
Apologies, super docker noob here, just followed blindly these steps on x86 (chrome box /w LE 9.0.2) and it worked great....until the reboot..
pi-hole doesn't seem to be running, I can't connect to the admin page docker says the container is up and running when running docker container ls command.
I've scrapped docker, reinstalled and followed the exact same steps that got it running the first time but it's behaving like after the 1st restart.
I don't know where to and how to look and troubleshoot, any help appreciated and sorry for the little added value on my end
UPDATE:
Stopping and removing the container then wiping the pihole folder in .config did the trick, I can get it up again over a fresh install; Not too sure how to troubleshoot surviving on restart....
Display MoreThey are the same thing - just renamed. Here
At the moment the LE addon is using pihole V 3.3 to use V4 you'll need to disable the pihole LE addon.
Download the new container:
docker pull pihole/pihole:latest
Then create and run a new script
docker run -d \
--name pihole \
-p 53:53/tcp \
-p 53:53/udp \
-p 80:80 \
-e DNS1=9.9.9.9 \
-e DNS2=149.112.112.112 \
-v /etc/localtime:/etc/localtime \
-v /storage/.config/pihole/:/etc/pihole \
-v /storage/.config/pihole/dnsmasq.d/:/etc/dnsmasq.d \
-v /storage/.config/pihole/html/:/var/www/html/html/ \
-h $(cat /etc/hostname) \
-e ServerIP=$(ip route get 9.9.9.9 | awk '{ print $NF; exit }') \
-e WEBPASSWORD=libreelec \
--restart=unless-stopped \
pihole/pihole:latest
That will get you running on 4.0. There may be issues as noted by @aptalca
Hello,
i tried this script but i am not able to have the web interface
Here you can find my logs:
# docker logs -f /pihole # Show docker 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
WARNING Misconfigured DNS in /etc/resolv.conf: Primary DNS should be 127.0.0.1 (found 192.168.0.31)
# Generated by Connection Manager
nameserver 192.168.0.31
nameserver 1.1.1.1
[i] Existing PHP installation detected : PHP version 7.0.33-0+deb9u5
[i] Installing configs from /etc/.pihole...
[i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
[✓] Copying 01-pihole.conf to /etc/dnsmasq.d/01-pihole.conf
chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
::: Pre existing WEBPASSWORD found
Using custom DNS servers: 127.0.0.1 & 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.0.31",
"VIRTUAL_HOST" => "192.168.0.31",
Using IPv4 and IPv6
::: 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
http://sysctl.org/cameleon/hosts
simple_tracking.txt
simple_ad.txt
ad_servers.txt
::: Testing pihole-FTL DNS: FTL started!
::: Testing lighttpd config: Syntax OK
::: All config checks passed, cleared for startup ...
::: Docker start setup complete
[i] Pi-hole blocking is enabled
[✗] DNS resolution is currently unavailable
[✗] DNS resolution is not available
Display More
And also i don't know why i have this "DNS resolution is not available" as well.
Could you please me and let me know what i am missing?
i am a noobs in Docker.
Thanks in advance.
Configuration:
Rpi 3B+, LibreElec 9.1.501
I just try to install docker or pi-hole on my LE 9.1.501 on RPi3B+ but installation failed.
in log I found this:
2019-11-21 22:34:41.207 T:1462637440 NOTICE: DecodeJpeg: unable to decode fanart.jpg 960x540
2019-11-21 22:34:52.799 T:1462637440 ERROR: CCurlFile::Open failed with code 404 for service.system.docker-9.1.901.126.zip:
2019-11-21 22:34:52.800 T:1462637440 ERROR: CAddonInstallJob[service.system.docker]: failed to download special://home/addons/packages/service.system.docker-9.1.901.126.zip
2019-11-21 22:34:52.812 T:1462637440 ERROR: CAddonInstallJob[docker.linuxserver.pi-hole]: failed to install dependency service.system.docker
Can you upgrade to the latest release and the problem should be solved.
yes it helps... thank you
Hi Guys,
I tried installing pihole on the Raspberry PI, which is running libreelec. This is what I did:
1. SSH to Rpi
2. Ran:
docker run -d --name pihole --cap-add NET_ADMIN -p 53:53/tcp -p 53:53/udp -p 80:80 -e DNS1=127.0.0.1 -e DNS2=1.1.1.1 -v /etc/localtime:/etc/localtime -v /storage/.config/pihole/:/etc/pihole -v /storage/.config/pihole/dnsmasq.d/:/etc/dnsmasq.d -v /storage/.config/pihole/html/:/var/www/html/html/ -h $(cat /etc/hostname) -e ServerIP=$(ip route get 127.0.0.1 | awk '{ print $NF; exit }') -e WEBPASSWORD=xxxx123 --restart=unless-stopped pihole/pihole:latest
3. Ran 'docker ps':
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8d03253c7d62 pihole/pihole:latest "/s6-init" 45 seconds ago Up 43 seconds (heal.thy) 0.0.0.0:53->53/tcp, 0.0.0.0:80->80/tcp, 0.0.0.0:53->53/udp, 67/udp, 443/tcp pihole
The problem is that when I try to access the admin interface, I get "Connection Refused".
Any ideas how to solve it?
Any reason not to use the Linuxserver.io pihole container?
I've just tried your script on RPi4 and LE 9.2 and it works fine.
Post the url of docker logs /pihole |paste
Hi Iridium,
Thank you for replying so quickly
OK it's weird. 2 days later I tried the same script and it works now
Maybe it was a network issue? Anyways, tried the command and got:
MyPI:~ # docker logs /pihole |paste
chown: cannot access '/etc/pihole/dhcp.leases': No such file or directory
http://ix.io/28XT
Not sure if the 'chown' error is a problem or not?
Possibly something else was using port 80.
Also, your script seems to have the file locations the wrong way round. See Link
-v (New location):(Original location)
I had pi-hole working on OSMC but decided to give Libreleec a try. I have another pi-hole running on Debian-buster. I have no experience with Docker.
I didn't see any block lists. I tried copy and past from my other pi-hole via the web-abmin and I got.
Installation Failure: /etc/pihole/setupVars.conf does not exist! Please run 'pihole -r', and choose the 'reconfigure' option to fix.
I figured out I could run
docker exec -it eda0f4bcf462 pihole -r
But then after entering the ip address. I got
RTNETLINK answers: Operation not permitted
After doing it again with ipv6 disabled I do to
[i] Preparing to run gravity.sh to refresh hosts...
[i] Running gravity.sh
/etc/.pihole/automated install/basic-install.sh: line 1402: /opt/pihole/gravity.sh: No such file or directory
LibreELEC:~ #
/etc/ is R/O so your approach will not work.
If you running from the LE docker addon, then you can update the block list from the Web gui in tools. If you want to "copy" your settings, use the "teleporter" in settings to export/import.
Hi.
How can I install the Pi-hole web interface in the / storage / folder I would like to have access and edit several files.
I'm using this installer
thanks..
Which file?
Most web stuff is in /storage/.config/pihole/html/
Yes, this folder, but it ends there
Missing:
/ Admin /
/ Admin / scripts /
/ Admin / style / vendor /
there is no web interface
Those folders do NOT exist in a standard Pi-Hole installation.
Is available I have already found
/storage/.kodi/userdata/addon_data/service.system.docker/docker/overlay2/Docker_Container/diff/var/
despite everything, thank you for trying to help