From c1003e1df61d343e5b7ef2445fcafa6e46a4b131 Mon Sep 17 00:00:00 2001 From: lastlink Date: Tue, 25 Sep 2018 18:48:18 -0400 Subject: [PATCH] hostname guide --- Add-new-dns-hostnames.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Add-new-dns-hostnames.md diff --git a/Add-new-dns-hostnames.md b/Add-new-dns-hostnames.md new file mode 100644 index 0000000..01c2f1a --- /dev/null +++ b/Add-new-dns-hostnames.md @@ -0,0 +1,30 @@ +# Guide on adding new custom hostnames to point to wherever you'd like + +Really should have been a clear guide on how to do this. + +Based on: +* https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530 +* https://www.reddit.com/r/pihole/comments/8spvq1/resolve_local_hostnames_and_use_pihole_for/ + +### To add a new hostname record run this command: + +* `pihole -a hostrecord home.mydomain.de {Router's-WAN-IP}` + *e.g. `pihole -a hostrecord home.mydomain.de 192.168.1.15` + +### To make sure .local machine works: + +* `vi /etc/dnsmasq.d/01-pihole.conf` + +Add: +`server=/domain.lan/10.10.10.10` where the end number is the ip of your router e.g. 192.168.1.1 + + +### Don't forget to restart after making any dns changes: + +* `systemctl restart pihole-FTL.service` +* `reboot` this is a linux restart command that should not be needed + +Test + +* `ping home.mydomain.de` will only work if ip 192.168.1.15 is a machine that accepts pings +