Pi-hole as your local DHCP server. This is very easy. It does not matter what method you would use to login to the Pi as long as you can access and edit the /etc/hosts file, you are golden. In this guide, I will be using CLI.
Make a backup of the hosts file just in case.
sudo cp /etc/hosts /etc/hosts.bk
Once you are logged in, open the /etc/hosts via sudo.
sudo nano /etc/hosts
You will see something like in Figure 1.
You can add more IP to name mappings at the bottom
GNU nano 2.7.4 File: /etc/hosts 127.0.0.1 localhost ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters 127.0.1.1 pivpn # netshinobi nodes 10.0.17.12 nextcloud 10.0.17.12 emby 10.0.17.12 unifi 10.0.17.12 resilio 10.0.17.23 pve 10.0.17.16 obihai 10.0.19.11 pivpn 10.0.19.11 pidns 10.0.19.12 pivpn-users
Once done, press CTRL + X then press Y then Enter to overwrite the existing hosts file. Now, you would need to restart the dnsmasq
sudo service dnsmasq restart
At this point, you are good to go. All you need to do is enter the name and Pi-hole will resolve the IP.
Donations are always appreciated:
BTC: 14wVPFBWNAKmfNsgUrPpw8EytkXFLjxYoU ETH: 0x8528793dF77a57186f5B15dA6DC1eaA3c5e92c4a LTC: LMpW2rGYnYdUwvnHA4huB6TGcPEEc1JzXw NAV: NM7c5u8Vius5UJWtCdTdQxgKT9F3PpTXbK Any ERC-20 (tokens/coins): 0x9f337F9e0796eD3af5ccF0332674fD1eaDfA03BC