Saturday, February 1, 2020

Putting Pi-hole to work

I've been reading about my friends' use of Pi-hole on their home networks, and I've been curious about trying it to see how well it does. I've resisted doing so, primarily because of the single point of failure a pi-hole system represents: if it's unavailable, you get no DNS.

And we all know, it's never DNS...except when it is.

An alternative, naturally, it to run a pair of systems. Why not? Raspberry Pi devices are relatively cheap, and the software is all no-charge.

For most home users, that might be fine, but I run a lab in my home that also provides services to the household, so I had more permutations to worry about: what happens if my Pi dies? what happens if my domain controllers are unavailable? Etc.

The solution I've settled on is to run a primary Pi-hole server as a VM in my lab environment—which gives me more than enough performance and responsiveness, even under the most demanding of situations—and a secondary with a Raspberry Pi, so that even if the VM environment goes "pear shaped," I still get DNS resolution.

In order to accommodate several types of outages, yet avoiding the need to both double-up the configuration work (with the potential of missing an update and having weird results to troubleshoot) while providing pre-configured support for a couple of likely failure and maintenance scenarios, I've mated the two systems together in a failover cluster by configuring the "keepalive" daemon along with some scripting to keep the two systems in sync for the blocking function, while leaving some configuration elements (upstream DNS servers for one) independent of each other.

I didn't do the "heavy lifting" on the sync and keepalive aspects; those were provided by reddit user Panja0 in this post: https://www.reddit.com/r/pihole/comments/d5056q/tutorial_v2_how_to_run_2_pihole_servers_in_ha/

I'm running ubuntu server 19.10 (Eoan Ermine... whatever) instead of Raspbian Stretch/Buster, so there have been a number of changes I've had to make to the systems to adapt:

  • To get keepalived installed, I needed libipset11, not libipset3 (mentioned in the comments of the HA tutorial)
  • I had to modify the rsync command arguments in the synchronization script due to changes between Debian versions that I'm running versus the original post (mentioned in the comments of the HA tutorial)
  • I had to permit my rsync user to skip password re-auth by editing the sudoers file; I think this may also be a version-specific issue.
  • I added an NTP client to utilize my GPS-based hardware time server; this is super important when using a Raspberry Pi without a real-time clock HAT add-on.
  • The primary system uses the lab's DNS (domain controllers) for its upstream DNS servers. In addition to avoiding the need to configure additional conditional forwarding rules for dnsmasq, this gives the Pi-hole server the identity of the clients via DNS
  • The secondary uses OpenDNS servers—I have a household account with several filtering options enabled already—with a dnsmasq configuration for conditional forwarding on the domain.
Given my homelab, it was pretty trivial to set this up as a VM, but what really sold it to me was getting the Raspberry Pi running in concert. I originally started with a Pi 3 Model B that I had lying around after an old project that I'd quit, but the performance difference between the two platforms was so noticeable that going with a true primary/secondary setup made the most sense. I considered upgrading to the Pi 4, but decided that my desire to avoid purchasing micro-HDMI adapters outweighed the value in the more-robust, newer model. I did decide to go ahead and upgrade from the 3 to the 3+, however, when I discovered that my local MicroCenter had them for $34US; I also paired the new unit with a passive heatsink case, which has allowed the Pi to run significantly cooler (30°F) than the original setup, which utilized aluminium heatsinks and a non-vented plastic case.

Aside from this "vanilla" setup, I also took note of the additional block lists that my friend Tim Smith wrote about in a blog post. I need to let this "bake" for a while before considering it finished, but I'm liking what I'm seeing so far.

221 comments:

  1. Tamil sex stories - These sex stories is only for entertainment purpose. Here you can find best sex stories in your language. Share these Indian sex stories with your friends also.
    https://tamilkamaverihd.net/tamil-sex-stories/

    https://tamilkamaverihd.net/tamil-kamakathaikal/

    https://tamilkamaverihd.net/tamil-dirty-stories/

    ReplyDelete
  2. Certainly Norton Antivirus software is the most preferred and reliable application for keeping our data and resources completely secure from online threats because of its safety and security. Being a user of this software if you are having technical issue and looking for assistance then call us at norton.com/setup support number.
    office setup
    www.office.com/setup
    mcafee setup
    mcafee.com/activate
    mcafee activation
    norton com/setup
    norton setup
    norton.com/activate

    ReplyDelete
  3. In case you credit card is not functioning well and you are facing technical issues and errors then get assistance from our experts. We can help you in all such issues and best way to get instant help.
    boa login
    boa sign in
    citibank credit card login
    citibank login
    social security login
    my social security
    social security login
    my social security

    ReplyDelete
  4. When you are unable to open myaccountaccess or it is not functioning properly then call our support teams. At any point of time when you are having technical issues and errors or facing some suspicious activities like hacking, spamming and more then immediate call to our agency. We are available 24X7 to assist all .
    myaccountaccess.com
    www myaccountaccess com
    myaccountaccess.com
    www myaccountaccess com
    myaccountaccess.com
    www myaccountaccess com
    myaccountaccess.com
    www myaccountaccess com
    myaccountaccess.com
    www myaccountaccess com

    ReplyDelete
  5. This article content is really unique and amazing.This article really helpful and explained very well.So i am really thankful to you for sharing keep it up..

    เกมบาคาร่าออนไลน์
    เสือมังกร
    เกมไพ่
    เกมไพ่เสือมังกร

    ReplyDelete
  6. Get the home decor you need to add some style to your living spaces. Shop for home decor, art, lighting, bedroom, bath, and dining.

    ReplyDelete
  7. Leedon Green by Yanlord & MCL. Hotline 61008187. Get Discounts, Direct Developer Price, Brochure, Floor Plan, Price List & More. Former Tulip Garden at Farrer.

    ReplyDelete
  8. Ki Residencesby Hoi Hup & Sunway JV. Hotline 61008187. Get Discounts, Direct Developer Price, Brochure, Floor Plan, Price List & More.

    ReplyDelete
  9. Sometimes, learning the Java programming through books alone are not enough. For some people, the delivery of book material is sometimes difficult to understand

    ReplyDelete
  10. They sometimes juggle several sales and several renovations at any given time. It is important to know that there is an art learning how to flip a house and make a profit instead of losing money.Westminster Finance
    Westminster Finance
    Westminster Finance
    Westminster Finance
    Westminster Finance

    ReplyDelete
  11. Hi, your blog is amazing. I feel happy after visiting your blog. thanks for sharing such type of info. keep it continue and share some other amazing tips and tricks kinemaster without watermark

    ReplyDelete
  12. wowhh keren banget informasinya bang media pwhm

    ReplyDelete
  13. This tablet is absorbed into your blood approximately 30 to 60 minutes after the intake and start acting on your system by inhibiting the enzyme PDE5 (phosphodiesterase type) found in penis.
    Kamagra
    Kamagra
    Kamagra
    Kamagra
    Kamagra
    Kamagra

    ReplyDelete
  14. very good information. it's so helpful.Understanding Contract Manufacturing A business unit with a proficient design but lacking in key manufacturing skills or bandwidth to handle large consignments might seek to enter into contract with a manufacturer that is skilled at the manufacturing process. A manufacturer may outsource one or more tasks of the production process to a third party.Custom Gear Manufacturing
    From designing to the end product, any scaled-down process that is outsourced would be bound by Contract Manufacturing.

    ReplyDelete
  15. Javelin Male Enhancement overall good health is important to good healthy sexual living. Review your current health and medications with your doctor, eat right and get plenty of exercise, then consider natural male enhancement products if needed.Female sexual enhancement pills, female libido enhancers and other similar products will be the subject of a future article.Disclaimer: The Erectile Dysfunction (ED), Male Impotence and male enhancement pill

    ReplyDelete
  16. Your blog really nice. Its sound really good. I am very time read your blog. Thanks for the sharing this blog with us.
    Best Life Insurance
    Life Insurance
    Insurance Cashback Offer
    Life Insurance Comparison

    ReplyDelete
  17. I read a article under the same title some time ago, but this articles quality is much, much better. How you do this
    Click
    here for
    more
    info

    ReplyDelete
  18. I read a article under the same title some time ago, but this articles quality is much, much better. How you do this
    Click
    here for
    more
    info

    ReplyDelete
  19. Extremely inspired! Everything is extremely open and clear illumination of issues. It contains really certainties. Your site is extremely important. Much obliged for sharing.
    Click
    here for
    more
    info

    ReplyDelete
  20. Nice story. It's good that they have made something like these. This looks a whole lot better to me.
    Click
    here for
    more
    info

    ReplyDelete
  21. I am always searching online for articles that can help me. There is obviously a lot to know about this. I think you made some good points in Features also. Keep working, great job
    Click
    here for
    more
    info

    ReplyDelete
  22. Thank you for taking the time to publish this information very useful!
    Click
    here for
    more
    info

    ReplyDelete
  23. I am a new user of this site so here i saw multiple articles and posts posted by this site, I curious more interest in some of them hope you will give more information on this topics in your next articles
    Click
    here for
    more
    info

    ReplyDelete
  24. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free
    Click
    here for
    more
    info

    ReplyDelete
  25. I was extremely satisfied to discover this site.I needed to thank you for this incredible read !! I certainly getting a charge out of each and every piece of it and I have you bookmarked to look at new stuff you pos
    Click
    here for
    more
    info

    ReplyDelete
  26. You have a good point here! I totally agree with what you have said !! Thanks for sharing your views ... hope more people will read this article!
    Click
    here for
    more
    info

    ReplyDelete
  27. I read a article under the same title some time ago, but this articles quality is much, much better. How you do this
    Click
    here for
    more
    info

    ReplyDelete
  28. Extremely inspired! Everything is extremely open and clear illumination of issues. It contains really certainties. Your site is extremely important. Much obliged for sharing.
    Click
    here for
    more
    info

    ReplyDelete
  29. Nice story. It's good that they have made something like these. This looks a whole lot better to me.
    Click
    here for
    more
    info

    ReplyDelete
  30. I am always searching online for articles that can help me. There is obviously a lot to know about this. I think you made some good points in Features also. Keep working, great job
    Click
    here for
    more
    info

    ReplyDelete
  31. Thank you for taking the time to publish this information very useful! very useful!
    Click
    here for
    more
    info

    ReplyDelete
  32. I am a new user of this site so here i saw multiple articles and posts posted by this site, I curious more interest in some of them hope you will give more information on this topics in your next articles next articles
    Click
    here for
    more
    info

    ReplyDelete
  33. This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value of providing a quality resource for free resource for free
    Click
    here for
    more
    info

    ReplyDelete
  34. I was extremely satisfied to discover this site.I needed to thank you for this incredible read !! I certainly getting a charge out of each and every piece of it and I have you bookmarked to look at new stuff you pos stuff you pos
    Click
    here for
    more
    info

    ReplyDelete
  35. You have a good point here! I totally agree with what you have said !! Thanks for sharing your views ... hope more people will read this article ! read this article!
    Click
    here for
    more info

    ReplyDelete
  36. Amazing job done from your side. Thanks for sharing
    https://premiumcrack.com/manycam-pro-crack/

    ReplyDelete
  37. Thanks for sharing such an amazing articles.
    https://premiumcrack.com/minitool-power-data-recovery-crack/

    ReplyDelete
  38. Vitrexotin RXincluding the penis. It helps to correct atheroscerosis, hypertension and depression,

    ReplyDelete
  39. Vigrafirmt Male Enhancement
    ion or Male Impotence treatment you choose, prescription drugs or a natural male enhancem

    ReplyDelete
  40. facilities. If you have a health care facility to manage, make sure you get the best air purifiers to meet your needs on a regular basis.Keto Plus Pro

    ReplyDelete
  41. Flexuline a professional. Make sure that you install air purification units that are easy to install, inspect, monitor and repair. Before you get one, it is important that you consult a good professional.

    ReplyDelete
  42. I was able to find good information from your zzzoomer articles.

    ReplyDelete
  43. Nutrapharmex Keto
    shedding off excess pounds and which is gaining popularity these days is the detox weight

    ReplyDelete
  44. Spot on with this write-up, zzzoomer I seriously believe this website needs much more attention. I’ll probably be returning to read more, thanks for the advice!

    ReplyDelete
  45. Ciagra Male Enhancement including the penis. It helps to correct atheroscerosis, hypertension and depression, absentmindedness and memory problems. Ginkgo also protects against oxidative cell A

    ReplyDelete
  46. Nutrapharmex Keto However, if you are sick and tired of being confused, tired of taking the weight off only to put it back on, and tired of wondering how to take the first steps to deciding the right diet

    ReplyDelete
  47. facilities. If you have a health care facility to manage, make sure you get the best air purifiers to meet your needs on a regular basis Cartel Health

    ReplyDelete
  48. about what you put Exceptional Keto into your body, and not base your decision upon taste alone. Unfortunately, the majority of people base their beverage choices on taste and usually upon

    ReplyDelete
  49. Exceptional Keto and philosophical approach employs their proprietary Adaptive Coaching Process. The organization's

    ReplyDelete
  50. Pretty! This has been an extremely wonderful article. Thank you for providing this information.viablequran.com

    ReplyDelete
  51. https://canstretch.com/how-to-write-a-procedure-essay-stage-by-phase-manual/
    https://bernizilla.com/how-to-write-down-a-system-essay-move-by-stage-guide/
    https://butonwood.com/how-you-can-title-an-essay-complete-guidebook/
    https://kickoff0bet789.com/the-best-way-to-title-an-essay-comprehensive-information/
    https://downupyoyo.com/the-most-beneficial-essay-subjects-tips/

    ReplyDelete
  52. https://planetvaporok.com/the-top-essay-topics-ideas/
    https://shutterhedge.com/how-to-put-in-writing-a-conclusion-for-an-essay/
    https://esabl.com/top-rated-ideal-assignment-crafting-expert-services/
    https://agories.com/top-rated-greatest-assignment-creating-providers/
    https://doultonuse.com/how-to-write-a-rhetorical-examination-essay/
    https://cardexco.com/how-to-put-in-writing-a-rhetorical-assessment-essay/

    ReplyDelete
  53. Italian products online The fish heart, dried and salted, is a forte of Sicilian and Sardinian food, like bottarga and increased in value by admirers of fish. The preparing of the core of fish is like that of fish roe. The heart is salted and put between two tables under a press. Following 20 days it is set to dry in the shade, in a ventilated region. The relieved fish heart has a solid taste, thusly it doesn't need exceptional flavoring. It is utilized in hors d'oeuvres, simply prepared with additional virgin olive oil, in plates of mixed greens or ground chips on pasta.

    ReplyDelete
  54. Grana Padano The fish heart, dried and salted, is a forte of Sicilian and Sardinian food, like bottarga and increased in value by admirers of fish. The preparing of the core of fish is like that of fish roe. The heart is salted and put between two tables under a press. Following 20 days it is set to dry in the shade, in a ventilated region. The relieved fish heart has a solid taste, thusly it doesn't need exceptional flavoring. It is utilized in hors d'oeuvres, simply prepared with additional virgin olive oil, in plates of mixed greens or ground chips on pasta.

    ReplyDelete

  55. What a fantabulous post this has been. . I am grateful to you and expect more number of posts like these. Thank you very much.
    Gastroenterolog

    ReplyDelete
  56. Grana Padano One thing about Italian food is the regional variances. Pizza and pasta types vary from region to region as do such things as breads. Within these regional variances certain areas of Italy do things better than others, whether it be because of the terrain or the climate different products are associated with different areas, such as Parma ham from Parma, pizza from Napoli, meat dishes from Turin and fish dishes from Sardinia.

    ReplyDelete
  57. Parmigiano Reggiano One conventional utilization of an entire Parmigiano Reggiano head is to utilize it as a serving pot. On uncommon events, when one has many visitors to serve (culinary fairs, feasts, huge parties) the entire head is spent and altogether burrowed out so the exposed outside layer stays, steaming pasta would then be able to be poured in it and served from in that.

    ReplyDelete