[SUPPORT] pihole for unRaid - Spants repo


899 posts in this topic Last Reply

Recommended Posts

Having the same problem.  My actual docker pi-hole log was huge, I decided to nuke it and see if that helps.  Going to test it all out in a bit.

 

Edit - Nope still can't see query stats/etc.  Getting very frustrated with this :(

Edited by Verno
Link to post
  • Replies 898
  • 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

Anyone on here run pihole in a docker and have a Mikrotik router? I want to set pihole as DNS Server but I am finding its harder than I first thought. On my old Asus router it was really simple.. Any help would be much appreciated.

Link to post
6 hours ago, westsola said:


If I use pi-hole for my dns, nothing will resolve :(

 

Have you set DNS1 and DNS2 variable to point to 8.8.8.8 or 1.1.1.1 ? If pihole doesnt need to block it, uses DNS1 and DNS2 to do the look up.

Try posting a screenshot of your settings if not. 

Link to post
On 5/13/2018 at 4:34 PM, nuhll said:

It seems like this docker needs a way to get automatic rid of logs.

 

I guess the logs are located somewhere inside the docker.

 

I used to use the script below with the userscripts plugin to delete the logs once a day.

It looks like pihole stores a log in  /var/log in the docker. The recent Docker from digiinc was supposed to put these on a volume mount.

 

#!/bin/bash
DOCKER_NAME=pihole
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin


#          Download any updates from the adlists
docker exec $DOCKER_NAME pihole updateGravity > /dev/null

# Pi-hole: Update the Web interface shortly after gravity runs
#          This should also update the version number if it is changed in the dashboard repo
#docker exec $DOCKER_NAME pihole updateDashboard > /dev/null

# Pi-hole: Parse the log file before it is flushed and save the stats to a database
#          This will be used for a historical view of your Pi-hole's performance
# docker exec $DOCKER_NAME dailyLog.sh # note: this is outdated > /dev/null

# Pi-hole: Flush the log daily at 11:58 so it doesn't get out of control
#          Stats will be viewable in the Web interface thanks to the cron job above
docker exec $DOCKER_NAME  pihole flush > /dev/null

 

 

Link to post

Im nto sure how to use it. Just place it inside the userscripts plugin and run once a day? What you do?

 

How does it delete logs?

 

I added as daily, removed the outcommented lines and added logging

Quote

 


#!/bin/bash
DOCKER_NAME=pihole
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
logger PiHole Cleanup startet

#          Download any updates from the adlists
docker exec $DOCKER_NAME pihole updateGravity > /dev/null
logger PiHole Gravity geupdated

# Pi-hole: Flush the log daily at 11:58 so it doesn't get out of control
#          Stats will be viewable in the Web interface thanks to the cron job above
docker exec $DOCKER_NAME  pihole flush > /dev/null
logger PiHole flushed, finished
 

 

Edited by nuhll
Link to post
6 hours ago, spants said:

 

Have you set DNS1 and DNS2 variable to point to 8.8.8.8 or 1.1.1.1 ? If pihole doesnt need to block it, uses DNS1 and DNS2 to do the look up.

Try posting a screenshot of your settings if not. 

Yep, am using 9.9.9.9 and 8.8.8.8. 

It looks like I fixed my issue. I went to grab a screenshot of my settings and found the below setting. My pihole wasn't working at all. Running on a Dell R710 with a bonded and bridged interface. I had to change it from Listen only on interface br0 to Listen on all interfaces. Works great now. Hope this helps someone else. 

Interface listening behavior

Listen on all interfaces 
Allows only queries from devices that are at most one hop away (local devices)
Listen only on interface br0
Listen on all interfaces, permit all origins

Thanks spants!
Link to post

Internally pi-hole only knows interface "eth0".

image.png.ba7c6d102a5c06f40aa8097965dc6f3c.png

 

Update/create the corresponding template settings (INTERFACE and DNSMASQ_LISTENING).

 image.png.d638fb6f5aba6a401bb558a63a8b1a0f.png

 

The above entries force the pi-hole settings to the following

image.png.4aa41d63d1871ecdc463f73a0ba4d47d.png

 

The container settings can refer to a custom network, e.g. br0 or br1 and let pi-hole use a fixed IP address.

image.png.2dda5f0c2b5794511b43f2ad44a22a0d.png

 

 

Edited by bonienl
Link to post

Ah, I was following the spaceinvaderone tutorial where iirc the variable INTERFACE as br0. Maybe that's where my trouble began. It's working for now.. so I'm tempted to leave it. Though I'm planning to take my 4 NICs out of bonded mode soon and just use eth0.. going to try pfsense or sophos on eth3/4. 

Link to post

wohoooho. I wonder, i always had br0 without problems for days.

 

I changed now to eth0 also, does work now again, also admin cp.

 

THANK YOU SO MUCH! Why it says br0 when you need to have it eth0 anyway? Oo

 

1. Edit: only one super small "problem". I want to use 1.1.1.1 as my favorite DNS because its the fastest, so i entered 1.1.1.1 and as backup 8.8.4.4... but he always do it exact the other way around and use 8.8.4.4 first.. wtf? :D

 

2. i would like to enable "log rotation" and expose the pihole.log to /etc/pihole/pihole.log, i changed the config, but it doesnt write anything to it...?

Edited by nuhll
Link to post
On 5/16/2018 at 8:28 PM, bonienl said:

Internally pi-hole only knows interface "eth0".

image.png.ba7c6d102a5c06f40aa8097965dc6f3c.png

 

Update the corresponding template setting.

image.png.6e04795a2abcbf7d90e09a24736a2176.png

 

And pi-hole itself

image.png.4aa41d63d1871ecdc463f73a0ba4d47d.png

 

 

Ohhh I think this might also resolve my issue with Mikrotik! Will report back later when I am at home to test :-) Thanks.

Link to post
On 5/16/2018 at 12:28 PM, bonienl said:

Internally pi-hole only knows interface "eth0".

image.png.ba7c6d102a5c06f40aa8097965dc6f3c.png

 

Update the corresponding template setting.

image.png.6e04795a2abcbf7d90e09a24736a2176.png

 

And pi-hole itself

image.png.4aa41d63d1871ecdc463f73a0ba4d47d.png


Thank you for the reply. I changed my interface variable to eth0. I'm wondering if I need to change the 'Network Type' from Custom Network- br0? Options area Bridge, Host, or None.. If I leave it as Custom Network -br0, I can set the ip address. Should I leave this as is?

Link to post
1 hour ago, westsola said:


Thank you for the reply. I changed my interface variable to eth0. I'm wondering if I need to change the 'Network Type' from Custom Network- br0? Options area Bridge, Host, or None.. If I leave it as Custom Network -br0, I can set the ip address. Should I leave this as is?

 

I just changed the Interface to eth0 and now my Mikrotik can use Pihole as DNS server. Thank you!!! Spent HOURS trying to find a solution and I thought it was something on the Mikrotik as with my old Asus it worked fine on br0.. who knows what changed but its running.

 

Stoked!

Link to post

Anyone else have problems with PiHole after a reboot or when trying to update the docker?

I haven't quite been able to solve the issue yet, but every time I reboot or run an update, UnRaid tells me that the PiHole docker couldn't be started because it cannot be found. Same thing when I restart, can't start the docker because it can't be found.

To fix it each time I end up having to change my router settings back to a standard DNS and then reinstall the docker then reconfigure the DNS settings.

I like PiHole, but this issue is really annoying as it takes down the web for my entire house each time I have to reboot UnRaid.

 

Would appreciate any help!

Link to post

Yeah. Dont need to use pi hole for unraid. To your clients you should give pi holes address as first dns server, and one always reachable dns server, like 1.1.1.1. So if you local server is not reachable, all devices still work.

 

To the update problem, i cant say very much, never happend to me.. but you might want to check your piholes (and or) unraids logs.

Edited by nuhll
Link to post
14 hours ago, bnr32jason said:

Anyone else have problems with PiHole after a reboot or when trying to update the docker?

 

As bonienl mentioned your problem is very likely because in the unRAID Network Settings you point unRAID to the Pihole IP address for DNS.  That will cause some problems.

 

When you update the Pihole docker the docker is stopped and now your server has no DNS.  Depending on timing of things, it could cause some processes to not work properly.

 

When you reboot the server, unRAID is looking to make an Internet connection, but, if the Pihole docker has not yet started (with latest version of unRAID you can now set the docker start order) you have no DNS and thus no Internet for the unRAID server.

 

If you have Pihole set to Google DNS, for example (8.8.8.8 and 8.8.4.4) set those IP addresses as the DNS addresses for your unRAID server in Settings>Network.  unRAID has no reason to go through Pihole for DNS. Limetech/Bonienl haven't gone crazy inserting ads in the GUI ?

 

Your problem is not a Pihole problem, it is most liekly an unRAID configuration problem.

Edited by Hoopster
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.