Supporting the "ipaddress fqdn hostname" format in the Local DNS Records page

Hi all,
Just opening a discussion so we can talk about supporting the ipaddress fqdn hostname format in the Local DNS Records page

Some perks of supporting the ipaddress fqdn hostname format:

  • compatibility for someone who isn't using Pihole's DHCP
  • compatibility for a router where DHCP doesn't support DNS suffix

So, to start off, /etc/pihole/custom.list is a DNSMasq list file, and supports the ipaddress fqdn hostname format. As of now, custom.list is supposed to be in the format ipaddress hostname.
However, ipaddress fqdn hostname does work just fine. But, the UI doesn't display too nicely.

But, I am thinking that, with a little bit of tweaking to customdns.js and dns_records.php, we should support the ipaddress fqdn hostname format.

My proposal is rejiggering the Local DNS Records page so it can be more versatile-

  • support both ipaddress fqdn hostname AND ipaddress hostname formats

For work effort, this would entail adding a third column, FQDN, to customdns.js, and dns_records.php

nano /etc/pihole/custom.list

192.168.1.1 PortRoyal.Tortuga PortRoyal
192.168.1.186 Harbormaster.Tortuga Harbormaster
192.168.1.69 BlackPearl.Tortuga BlackPearl
192.168.1.96 HMSInterceptor.Tortuga HMSInterceptor
192.168.1.190 Shield.Tortuga Shield

Note: here is proof it works fine. nslookup still works!
image

Here's how it looks. Other than working fine, it doesn't display nicely.

Expected behaviour:
The domain field shows domains (or even the FQDN)
The IP field shows IPs.

Actual behaviour:
The domain field shows hostnames
The IP field shows IPs and also FQDN.

Would love to hear some thoughts on my idea!
Thanks for your time reading this and have a great day!

Hmm... I feel silly now removing all of those while importing my /etc/hosts file into the new custom.list file :slight_smile:

I am very happy with the new Local DNS Records sub-menu but it could use some improvements like this and also editing existing Local DNS Records for example.
Right now we can either add them or remove them and nothing more than that.

Hope we see some improvements for this part of Pi-Hole in the future :wink:

1 Like