[Pi-Hole] No need of the lan.conf anymore for local dns

This commit is contained in:
nicolas.dorier 2020-05-12 20:33:56 +09:00
parent f86b5dafc1
commit adbefbba5f
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE
3 changed files with 0 additions and 16 deletions

View File

@ -1 +0,0 @@
addn-hosts=/etc/pihole/lan.list

View File

@ -16,7 +16,6 @@ services:
ports: ports:
- "53:53/udp" - "53:53/udp"
volumes: volumes:
- "./pihole/02-lan.conf:/etc/dnsmasq.d/02-lan.conf:ro"
- "./pihole/resolv.conf:/etc/resolv.conf:ro" - "./pihole/resolv.conf:/etc/resolv.conf:ro"
- "pihole_datadir:/etc/pihole" - "pihole_datadir:/etc/pihole"
volumes: volumes:

View File

@ -51,17 +51,3 @@ Then running again
```bash ```bash
docker logs pihole | grep random docker logs pihole | grep random
``` ```
## Adding custom entry to pi-hole dns
You can easily add your local domains to pi-hole.
Imagine you have a NAS (like synology) on your local network with IP `192.168.1.3`, and you want to access it through `synology.lan`.
```bash
local_dns_list="$(docker volume inspect generated_pihole_datadir -f "{{.Mountpoint}}")/lan.list"
# In most cases this will be /var/lib/docker/volumes/generated_pihole_datadir/_data/lan.list
echo "192.168.1.3 synology.lan" >> "$local_dns_list"
pihole.sh restartdns
```
You can now browse `http://synology.lan` to access your NAS.