📋 Overview

Pi-hole is a popular DNS ad-blocker, but most tutorials recommend using Google DNS (8.8.8.8) or Cloudflare (1.1.1.1). For users in China, this creates a dependency on proxies.

Our Solution: Use Chinese DNS servers that work reliably without proxy!

🎯 Why Chinese DNS?

DNS ProviderIPsLatencyNeeds Proxy?
Google8.8.8.8~200ms❌ Blocked
Cloudflare1.1.1.1~180ms❌ Blocked
114DNS114.114.114.114~10ms✅ No
AliDNS223.5.5.5~15ms✅ No
BaiduDNS180.76.76.76~20ms✅ No

Benefits:

  • ✅ Fast response (~10-20ms vs ~200ms)
  • ✅ Works without proxy
  • ✅ Reliable even if proxies go down
  • ✅ No GFW interference

🚀 Installation

Step 1: Install Docker

curl -fsSL https://get.docker.com | sh

Step 2: Run Pi-hole Container

docker run -d \
  --name pihole \
  -p 53:53/tcp -p 53:53/udp \
  -p 8082:80/tcp \
  -e TZ="Asia/Shanghai" \
  -e WEBPASSWORD="pihole123" \
  -e DNS1="114.114.114.114" \
  -e DNS2="223.5.5.5" \
  -e DNS3="180.76.76.76" \
  -v /home/henry/pihole/etc-pihole:/etc/pihole \
  -v /home/henry/pihole/etc-dnsmasq.d:/etc/dnsmasq.d \
  --restart=unless-stopped \
  pihole/pihole:latest

Step 3: Access Admin Interface

http://192.168.51.74:8082/admin
Password: pihole123

📊 Performance Comparison

Before (Google DNS via Proxy)

Query Time: ~200ms
Dependency: Proxy must be working
Reliability: ❌ Fails if proxy down

After (Chinese DNS Direct)

Query Time: ~10ms (20x faster!)
Dependency: None
Reliability: ✅ Works even if proxies down

💡 Lessons Learned

  1. Use local DNS servers when possible (faster, more reliable)
  2. Don't depend on proxy for DNS (single point of failure)
  3. Multiple upstream DNS for redundancy
  4. Docker makes backup easy (just copy volumes)
  5. Monitor DNS performance (query time, cache hit rate)