{"id":17131295,"url":"https://github.com/dfithian/pi-hole-setup","last_synced_at":"2026-01-05T20:03:13.037Z","repository":{"id":85573574,"uuid":"166835966","full_name":"dfithian/pi-hole-setup","owner":"dfithian","description":"Set up pi-hole (https://pi-hole.net/)","archived":false,"fork":false,"pushed_at":"2023-01-18T02:17:43.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-29T11:11:23.078Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dfithian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-21T15:23:54.000Z","updated_at":"2023-01-18T02:17:49.000Z","dependencies_parsed_at":"2023-07-05T01:20:38.663Z","dependency_job_id":null,"html_url":"https://github.com/dfithian/pi-hole-setup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfithian%2Fpi-hole-setup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfithian%2Fpi-hole-setup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfithian%2Fpi-hole-setup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfithian%2Fpi-hole-setup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfithian","download_url":"https://codeload.github.com/dfithian/pi-hole-setup/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245212303,"owners_count":20578443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T19:23:08.451Z","updated_at":"2026-01-05T20:03:12.974Z","avatar_url":"https://github.com/dfithian.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pi Hole\n## Installation\n* get raspberry pi\n* download and unzip raspbian lite\n* get etcher\n* flash sd card with raspbian using etcher\n* touch file \"ssh\" in the \"boot\" drive root folder of the sd card\n* put the raspberry pi case and mount heat syncs and turn on and plug into router\n* get private ip address of router\n* get private ip address of pi from router\n* ssh to pi: `pi@\u003cip-address\u003e` password `raspberry`\n* change password: `passwd`\n* sudo apt-get update\n* sudo apt-get upgrade\n* install pi hole: `curl -sSL https://install.pi-hole.net | sudo bash`\n  * save the password that is needed for the admin screen\n* configure local DNS to use private ip of raspberry pi, apply settings\n* browse to `http://192.168.1.121/admin/`\n  * use the password from above\n\n## Upgrade\n* ssh to pi: `pi@\u003cip-address\u003e`\n* sudo apt-get update\n* sudo apt-get upgrade\n* `pihole -up`\n\n## DNS over HTTPS Steps\n* https://docs.pi-hole.net/guides/dns-over-https/\n* `wget https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.tgz`\n* `tar -xvzf cloudflared-stable-linux-arm.tgz`\n* `sudo cp ./cloudflared /usr/local/bin`\n* `sudo chmod +x /usr/local/bin/cloudflared`\n* `cloudflared -v` # verify\n* `sudo useradd -s /usr/sbin/nologin -r -M cloudflared`\n* `sudo vi /etc/default/cloudflared`\n  * ```\n    # Commandline args for cloudflared\n    CLOUDFLARED_OPTS=--port 5053 --upstream https://1.1.1.1/dns-query --upstream https://1.0.0.1/dns-query\n    ```\n* `sudo chown cloudflared:cloudflared /etc/default/cloudflared`\n* `sudo vi /lib/systemd/system/cloudflared.service`\n  * ```\n    [Unit]\n    Description=cloudflared DNS over HTTPS proxy\n    After=syslog.target network-online.target\n\n    [Service]\n    Type=simple\n    User=cloudflared\n    EnvironmentFile=/etc/default/cloudflared\n    ExecStart=/usr/local/bin/cloudflared proxy-dns $CLOUDFLARED_OPTS\n    Restart=on-failure\n    RestartSec=10\n    KillMode=process\n\n    [Install]\n    WantedBy=multi-user.target\n    ```\n* `sudo systemctl enable cloudflared`\n* `sudo systemctl start cloudflared`\n* `sudo systemctl status cloudflared`\n* `dig @127.0.0.1 -p 5053 google.com` # verify\n\n## Multiple WLANs\n\nSource: https://wiki.dd-wrt.com/wiki/index.php/Multiple_WLANs\n\n* This is _not_ a WAP\n* Do everything the article says up to \"3.2 Command Method\"\n* Change `dhcp-option=br1,6,[DNS IP 1],[DNS IP 2]` to `dhcp-option=br1,6,8.8.8.8`\n* Under \"Restricting Access\", did this:\n```bash\niptables -t nat -I POSTROUTING -o `get_wanface` -j SNAT --to `nvram get wan_ipaddr`\niptables -I FORWARD -i br1 -m state --state NEW -j ACCEPT\niptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu\niptables -I FORWARD -i br1 -o br0 -m state --state NEW -j DROP\niptables -I FORWARD -i br0 -o br1 -m state --state NEW -j DROP\niptables -I FORWARD -i br1 -d `nvram get wan_ipaddr`/`nvram get wan_netmask` -m state --state NEW -j DROP\niptables -I FORWARD -i br1 -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -m state --state NEW -j DROP\niptables -t nat -I POSTROUTING -o br0 -j SNAT --to `nvram get lan_ipaddr`\n```\n* Always be sure to save/apply/reboot whenever in doubt. Incremental progress is better than no progress.\n\n## Other Notes\n### From apt-get upgrade:\n```\napt-listchanges: Can't set locale; make sure $LC_* and $LANG are correct!\nReading changelogs... Done\nperl: warning: Setting locale failed.\nperl: warning: Please check that your locale settings:\n\tLANGUAGE = (unset),\n\tLC_ALL = (unset),\n\tLC_CTYPE = \"en_US.UTF-8\",\n\tLANG = \"en_GB.UTF-8\"\n    are supported and installed on your system.\n```\n\n## GCP\n\nhttps://github.com/rajannpatel/Pi-Hole-on-Google-Compute-Engine-Free-Tier-with-Full-Tunnel-and-Split-Tunnel-Wireguard-VPN-Configs/blob/master/CONFIGURATION.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfithian%2Fpi-hole-setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfithian%2Fpi-hole-setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfithian%2Fpi-hole-setup/lists"}