- 313 new markdown files created - 30 relationships embedded - 313 entries indexed - State initialized with usage data
2.1 KiB
2.1 KiB
| id | type | title | tags | importance | confidence | created | updated | relations | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| dc3ed16c-18db-4011-b866-3730316cd68d | problem | Pi-hole v6 DNS sync script needs update for new TOML config format |
|
0.7 | 0.8 | 2026-02-07T15:12:17.978779+00:00 | 2026-02-07T15:12:17.978779+00:00 |
|
Problem
The npm-pihole-sync.sh script at /mnt/NV2/Development/claude-home/server-configs/networking/scripts/npm-pihole-sync.sh is outdated for Pi-hole v6.
What happened:
- User removed pd.manticorum.com NPM proxy rule to route through Cloudflare
- Script synced NPM hosts but didn't remove pd.manticorum.com from Pi-hole DNS
- Caused continued 502 errors when accessing pd.manticorum.com API
Root Cause: Pi-hole v6 changed DNS record storage:
- OLD (v5): /etc/pihole/custom.list
- NEW (v6): /etc/pihole/pihole.toml (dns.hosts array in TOML format) AND /etc/pihole/hosts/custom.list
Manual Fix Applied: ssh pihole "docker exec pihole sed -i '/pd.manticorum.com/d' /etc/pihole/pihole.toml /etc/pihole/hosts/custom.list && docker exec pihole pihole reloaddns"
Script Requirements:
- Update /etc/pihole/hosts/custom.list (traditional format)
- Update /etc/pihole/pihole.toml hosts array (TOML format: hosts = ["IP DOMAIN", ...])
- Use 'pihole reloaddns' instead of 'pihole restartdns reload'
- Fix secondary pihole SSH (use IP with -o StrictHostKeyChecking=no instead of hostname)
Challenges:
- Pi-hole container has NO python3, NO perl
- Need pure shell/sed/awk solution
- TOML hosts array is multi-line regex replacement
TOML Format: hosts = [ "10.10.0.16 domain1.com", "10.10.0.16 domain2.com" ]
Secondary Pihole:
- IP: 10.10.0.226
- User: cal
- Need: ssh -o StrictHostKeyChecking=no cal@10.10.0.226
Files:
- Script: /mnt/NV2/Development/claude-home/server-configs/networking/scripts/npm-pihole-sync.sh
- Primary Pi-hole: 10.10.0.16 (pihole container)
- Secondary Pi-hole: 10.10.0.226 (pihole container)