Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: ADDITION: Pi-hole #321

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Conversation

bcurran3
Copy link
Contributor

@bcurran3 bcurran3 commented May 10, 2020

What this PR does / why we need it:

Adds Pi-hole

Which issue (if any) this PR fixes:

Fixes # #147

Any other useful info:

!!- WORK IN PROGRESS -!!

  • The pihole_with_traefik is up and working for me.
  • The pihole_without_traefik is untested.
  • There are some prerequisites that need to be added via automation
    - Reference article: Step 0

I'm open to suggestions on how to automate the prerequisites. I think checking if either option of Pi-hole is enabled and pulling the docker container is easy enough and I'll prolly add in the near future. Stopping the resolver and modifying the config will require more time (debugging in a VM!) to accomplish and I'd be very amicable if someone else wants to pop that part into this.

EDIT: "Step 0" done

@bcurran3
Copy link
Contributor Author

I think I fixed the merge errors adding in the Organizr references, but evidently GH doesn't automatically re-test and I can't mark resolved.

@xerosanyam
Copy link

@bcurran3 this is great! can't wait to get this :)

@bcurran3
Copy link
Contributor Author

bcurran3 commented Jun 27, 2020

Thanks. It works well. Dave appears to be very busy in real life and is only popping his head in randomly. So it might be awhile until this is added... (plus I should automate what I'm about to say next:)

You should be able to copy and paste it into your existing setup easily. You'll just want to do:
sudo systemctl stop systemd-resolved.service and sudo systemctl disable systemd-resolved.service when the pihole container fails because resolved is running. Then just manually start pihole in portainer.

REF: https://www.smarthomebeginner.com/run-pihole-in-docker-on-ubuntu-with-reverse-proxy/

I've got something else very cool on the back-burner waiting for the PRs to catch up since it is a global change and will be a big addition to remote/local security.

image

@bcurran3
Copy link
Contributor Author

For those who don't want to 1> wait for this to be merged 2> copy and paste it in their own files....

Check this out!:
https://medium.com/@devinjaystokes/how-to-set-up-a-pi-hole-ad-blocking-vpn-server-on-google-clouds-always-free-usage-tier-ff1d8a8c407e

I'm actually test using it now. Pretty cool running an ad-blocker in Google's cloud.

@@ -36,6 +36,14 @@
when: (traefik_enabled | default(False))
tags: traefik

- import_tasks: tasks/pihole_with_traefik.yml
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing indentation, build fails due to invalid yaml

@d-rk
Copy link
Contributor

d-rk commented Dec 23, 2020

@bcurran3 I gave you a PR which adds the missing dns resolver configuration (https://github.com/bcurran3/ansible-nas/pull/1/files) so we can hopefully integrate it in the PR here.

@bcurran3
Copy link
Contributor Author

bcurran3 commented Jan 3, 2021

@random-dwi Thanks. On my TDL to look at and compare to what I've done too.
I'll honestly tell you though that this is low priority as Ansible-NAS contributions have gone to a black hole for 7+ months. :(

@brock
Copy link

brock commented Nov 11, 2022

This article might be of interest: the solution suggested was to expose the ip address and port of the pi-hole container to ensure that other containers route through the pi-hole container. I have pi-hole installed on the bare-metal pi-hole, so I haven't tested this yet, but there are several reports of success

pi-hole/docker-pi-hole#1166 (comment)
https://discourse.pi-hole.net/t/solve-dns-resolution-in-other-containers-when-using-docker-pihole/31413

@kamilkrz
Copy link

@brock As I recently tested other dns server the same problem occurred I can confirm that this approach is working. I'm planning to move to pihole so I will confirm here as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants