Last active
March 7, 2019 13:46
-
-
Save ridingintraffic/7c6388c97fbdc34be41b12ff8b3d69dc to your computer and use it in GitHub Desktop.
recipe for pihole
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PI install (scroll down for docker) | |
1. install raspbian lite | |
2. setup ssh | |
3. change hostname | |
4. set static ip on router, see why you changed the hostname now ;) | |
5. $ curl -sSL https://install.pi-hole.net | bash | |
6. follow the prompts and get everything turned on. | |
- set upstream DNS, google 8.8.8.8 or cloudflare 1.1.1.1 | |
- use ipv4, ipv6 comes later | |
- enable the webinterface, we can script later | |
- install will take a while but "Constant vigilance!" otherwise you'll miss the last screen | |
!! pay attention to the last screen if you enabled the admin web page, it will give oyu the password | |
when you miss that page, ssh into the pihole and reset the password for the admin page with | |
$ pihole -a -p | |
Enter New Password (Blank for no password): | |
7. setup your laptop to use the dns server ip of the pi hole | |
OR | |
7.setup your router to use the dns server ip of the pi hole done | |
wait! there is a docker version ( out of the box it will only run on a linux or arm docker host sorry mac) | |
1. git clone https://github.com/pi-hole/docker-pi-hole/ | |
2. docker pull pihole/pihole:latest | |
3. sudo service systemd-resolved stop | |
## ubuntu has a resolver service running and we will need ot nuke that so we can run our own dns on port 53 | |
4. cd docker-pi-hole | |
5. ./docker-run.sh | |
6. docker logs -f $(docker ps --filter "name=pihole" --format "{{.ID}}") # lets tail some logs | |
7. docker logs --since 1h $(docker ps --filter "name=pihole" --format "{{.ID}}") | grep "Assigning random password" ## as long as you started the container less than an hour ago, we have the password | |
7a. # no password no problem # | |
$ docker exec -i -t $(docker ps --filter "name=pihole" --format "{{.ID}}") /bin/bash <enter> | |
root@1234:/ pihole -a -p <enter> | |
Enter New Password (Blank for no password): "5up3r53kr37" | |
8. setup your laptop to use the dns server ip of the pihole | |
OR | |
8.setup your router to use the dns server ip of the pihole |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment