Skip to main content

04 Settings for Pi-Hole!

1. Blocklists

Add Blocklist

# StevenBlack's Unified Hosts (already added during install)
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts

# Malware & Phishing Protection
https://blocklistproject.github.io/Lists/malware.txt
https://blocklistproject.github.io/Lists/phishing.txt
https://blocklistproject.github.io/Lists/ransomware.txt

# Abuse & Scam
https://urlhaus.abuse.ch/downloads/hostfile/
https://malware-filter.gitlab.io/malware-filter/urlhaus-filter-hosts.txt

# Tracking & Ads
https://blocklistproject.github.io/Lists/ads.txt
https://blocklistproject.github.io/Lists/tracking.txt

# Additional Security
https://v.firebog.net/hosts/Prigent-Malware.txt

Update Gravity

After adding blocklists, update Pi-hole's gravity database:

pihole -g

Or via web interface: Tools → Update Gravity

2. Configure DNS Settings

Custom DNS Cache Size

sudo nano /etc/dnsmasq.d/99-custom.conf

Add:

# Increase cache for 8GB RAM
cache-size=10000

# Rate limiting
dns-rr-limit=1000/10

# Enable DNSSEC
dnssec
trust-anchor=.,20326,8,2,E06D44B80B8F1D39A95C0B0D7C65D08458E880409BBC683457104237C7F8EC8D

3. Local DNS Records

Add local domain names for your network devices:

Settings → Local DNS → DNS Records

Examples:

192.168.0.48    pihole.home
192.168.0.1 router.home
192.168.0.10 nas.home

4. Group Management

Create groups for different filtering levels:

Group Management → Groups

  • Default - All devices
  • Kids - Strict filtering
  • Work - Moderate filtering
  • Trusted - Minimal filtering

Group Management → Clients

Assign devices to groups based on MAC address or IP.

5. Whitelist Important Domains *(optional)

Some legitimate domains may be blocked. Add common ones, if something is not working:

Domains → Whitelist

# Microsoft Services
clientconfig.passport.net
login.live.com
login.microsoftonline.com

# Apple Services
appleid.apple.com
ocsp.apple.com

# Google Services
android.clients.google.com
googleapis.com

# Streaming
device-metrics-us.amazon.com
netflix.com

# Smart Home
api.amazon.com
device-metrics-us-2.amazon.com

6. Enable Conditional Forwarding

For local network name resolution:

Settings → DNS → Advanced DNS settings

  • Enable Conditional forwarding
  • Local network: 192.168.0.0/24
  • Router IP: 192.168.0.1
  • Local domain name: home (optional)

7. Status Commands

Useful commands for monitoring:

# Pi-hole status
pihole status

# Tail queries in real-time
pihole -t

# Chronometer (live stats)
pihole -c

# Update gravity
pihole -g

# Check version
pihole -v

# Repair installation
pihole -r