Skip to content

Instantly share code, notes, and snippets.

@philfreo
Created June 29, 2020 21:26
Show Gist options
  • Save philfreo/476fbc77eecf8b7f0a7281cb3f1548bf to your computer and use it in GitHub Desktop.
Save philfreo/476fbc77eecf8b7f0a7281cb3f1548bf to your computer and use it in GitHub Desktop.
Pi-Hole Setup

Pi-Hole setup with Docker on Raspberry Pi and Ubiquiti USG

In Raspberry Pi, create a docker-compose.yml file grabbed from here: https://github.com/pi-hole/docker-pi-hole/#quick-start. Tweak timezone.

Then I went to http://rpi.local and saw a Pi-Hole message.

Then I saw that I could login to rpi.local/admin with the password found from sudo docker-compose logs pihole

In Pi-Hole Admin:

  • Settings > DNS
    • Upstream DNS Servers > choose Cloudflare instead of Google
    • Conditional Forwarding > enable. Use 192.168.1.1 and localdomain.

Setup Ubiquiti USG in Unifi Controller:

  • (If haven't done already) Give the Raspberry Pi a static IP
  • (If haven't done already) Choose our upstream DNS servers for USG; Settings > Internet > WAN Networks > WAN (Edit) > DNS Settings and add Cloudflare (1.1.1.1 and 1.0.0.1).
  • Settings > Networks > Local Networks > LAN (Edit) > DHCP Name Server: Set to manual and enter the Raspberry Pi IP address (192.168.x.x).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment