Category: pi-hole

Pi-Hole: DNSMASQ_WARN Maximum number of concurrent DNS queries reached (max: 150)

Resolving DNSMASQ_WARN – Maximum number of concurrent DNS queries reached (max: 150)

  • Connect to pihole via ssh
  • Navigate to /etc/dnsmasq.d/
  • If 02-custom-settings.conf does not exist, create it:
    • sudo nano 02-custom-settings.conf
    • Populate with the below and save :

  • Reboot pihole

CasaOS – Tinkering

Somewhere in my intertoobs wanderings I came across CasaOS and, given I had an idle Pi 4 laying around, I decided to poke at it. After all, if it works worth a damn it could help consolidate all the disparate systems I have running locally.

CasaOS is basically a slick Docker manager that rides atop another OS. Getting it up and running on the Pi with a fresh Raspbian install was painless. Simple configs, like mounting network shares, is a breeze. So far I have the following running in it:

  • PiHole – Installed without a hitch. If this runs well it’ll replace the standalone PiHole Pi 3 I have running.
  • Calibre Web – Also installed without a hitch. Love this, because I hate running the Calibre thick client full time on my server simply for its web interface. Not a lot of instructions on this one – just make sure you have your library mounted and defined as a volume in the container settings.
  • Jellyfin – Another painless install (make sure to mount your files volume as described in the above Calibre Web settings). I installed this as a replacement for my current Jellyfin music server, which runs standalone in a fully fledged VM, gobbling unnecessary resources. But I stopped it midway through indexing my gajillion files because I discovered:
  • Navidrome – Will it be better than Jellyfin for audio? I don’t know, but I’m giving it a shot.  Currently still indexing – on directory number 12406. Heh. Now, Navidrome wouldn’t run initially, and CasaOS kept screaming that it was unhealthy. Its log filled with “exec /app/navidrome: exec format.” I discovered that the image I was pulling isn’t the most recent. I exported the ComposeFile from within the settings of the failed install, uninstalled it, and updated the image source in the ComposeFile to point to “ghcr.io/navidrome/navidrome:develop.” I then imported the file (Custom Install > Import from within the App Store) and it installed fine
  • Memos – Completely painless install. Came across this randomly and figured maybe it’d replace my TiddlyWiki instance running on my server. We’ll see.
  • Mealie – I ran across this neat app via some Youtubers Apps of The Year vid and was intrigued. An app that’ll scrape a online recipe page, pull the pertinent details of the recipe and ditch all the ads and fluff? Yes please! However, Mealie wasn’t in the default app store for CasaOS. I found CoolStore for Casa and added it as a source. From there Mealie installed no problem, and now I have a slew of other apps to sift through as well. Perhaps Casa can even replace my standalone VPN Pi. We shall see.

No-IP DUC (Dynamic Update Client) for Raspberry Pi as a Service

I originally followed No-IP’s instructions for installing their DUC on a Raspberry Pi, and thought things were fine until I discovered upon IP change that updates weren’t. Updating, that is. With a little research I came across this extremely helpful site which outlines how to install the No-IP DUC as a service on Raspbian. Be aware, the instructions start from scratch, assuming that you don’t have the DUC installed yet.

For the bit highlighted above, you’re going to instead want to navigate to whatever the directory is that your DUC installation dir is within. In other words, if the NoIP DUC lives in /home/pi/noip/noip/noip-2.1.9-1 you’re going to want to navigate to /home/pi/noip before pulling down and unpacking that .tar as instructed in line 2/3 there. Other than that, this worked like a champ. Thanks site person!

Switching DNS – Windows

I use the mighty Pi-Hole to streamline my browsing experience.  Sometimes, though, the ole Hole can get in my way, blocking something I need to see.  If it’s a one time deal, and not something I want to whitelist (which Pi-Hole has thankfully made easy to do via the web interface as of the latest edition), I wanted an easy way to temporarily switch DNS servers.

Enter QuickSetDNS, a groovy little exe that can do just that. Download QuickSetDNS and unpack it into the destination of your choosing.  There’s no installer – it’s a simple standalone exe.  Fire it up, right click in the whitespace and create a new DNS server entry. I’ve got one for my Hole, and one that points to Google’s public DNS servers.

After creating your entries, right click on one and choose Copy SetDNS Command Line. Then right click on your desktop and create a new shortcut.  Paste the SetDNS command line in for the location of the shortcut and click Next.  Name it something informative, and save it.  Do the same with your other DNS entries in QuickSetDNS.

There.  Now you have shortcuts you can double click to change your local DNS settings.

pi-hole – Whitelisting Domains

Pi-hole is awesome, but sometimes it works too well.  For instance, my wife wants to watch the recipe videos on the Food Network site, and because of embedded ad content they get pi-holed.  Here’s how to whitelist domains:

First, you know that your pi-hole has a web interface, yes?  Point a browser to http://[thepiholeIPaddress]/admin/index.php to get to it.  From there you can check out the query log, which you’re gonna need.  If you find the log all full up and cumbersome, you can empty it.  Hop on your pi and, in a Terminal session, run:

1
sudo truncate /var/log/pihole.log --size 0

This will zero out the query log file.  Now use your browser to hit the site containing the data you want whitelisted.  You’re going to want to make sure that traffic other than your own is at a minimum while you do this, or you’re going to be seeing a lot of information in the log that isn’t applicable to the browsing you are doing.  Anyway, these days sites pull from a variety of domains, so you can’t just assume whitelisting the domain of the url will be sufficient.  For example, to get videos to work on the Food Network site I had to whitelist assets.adobetm.com.

Once the page has finished loading check the query log.  In it you’ll see both allowed domains and those that have been pi-holed.  Make a list of the holed domains; you’re going to have to add them your whitelist individually and then test to find the one you’re after.  To add a domain to the whitelist, open the whitelist (again in Terminal) in nano:

1
sudo nano /etc/pihole/whitelist.txt

Use your arrow keys to navigate to the bottom of the whitelist and then add your domain.  At this time, wildcards are not supported in this list.  Once you’ve added the domain, save the whitelist via ctrl+o.  Then open a second Terminal session and reload your pi-hole’s settings by executing the following:

1
/usr/local/bin/gravity.sh

Once reloading has completed refresh the page containing the data you’re trying to whitelist.  If you’ve achieved success, close your Terminal sessions (you can exit out of nano with ctrl+x) and call it a day.  If not, remove from the whitelist the domain you just added and move on to the next holed domain in your list.  Rinse and repeat until you see what you’re looking for.

Some people seem to like using the Whitelist Assistant Chrome extension when doing this.  I find pi-hole’s query log to be absolutely sufficient.