What's new

IPv6 dns server ips broadcast

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Hopefully OP got a solution one way or another, I have an off topic question since we are talking about PiHole now.
@SomeWhereOverTheRainBow, is there any way you have found to have "friendly" client names listed in Pihole, instead of the just the hostnames, when NOT using it as the DHCP server? Example instead of amazon-hdas568567 I want it to say "Kitchen Echo Show". I want to bind the names to the MAC, not the IP, since the IP may change.
From DNSMASQ manpage
-G, --dhcp-host=[<hwaddr>][,id:<client_id>|*][,set:<tag>][tag:<tag>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore] Specify per host parameters for the DHCP server. This allows a machine with a particular hardware address to be always allocated the same hostname, IP address and lease time. A hostname specified like this overrides any supplied by the DHCP client on the machine. It is also allowable to omit the hardware address and include the hostname, in which case the IP address and lease times will apply to any machine claiming that name. For example --dhcp-host=00:20:e0:3b:13:af,wap,infinite tells dnsmasq to give the machine with hardware address 00:20:e0:3b:13:af the name wap, and an infinite DHCP lease. --dhcp-host=lap,192.168.0.199 tells dnsmasq to always allocate the machine lap the IP address 192.168.0.199.

You can read more about it


but I believe you would marry the mac address on the parent network to a specific record you want.
 
@jtp10181
However, I am not quite sure what limitations this has. I would do some digging around on the manpage, make sure it crosses all the t's and dots all the i's before really investing into it.
 
Code:
local=/$(nvram get ipv6_prefix | awk -F: '{for(i=1;i<=NF;i++)x=x""sprintf (":%4s", $i);gsub(/ /,"0",x);print x}' | cut -c 2- | cut -c 1-20 | sed 's/://g;s/^.*$/\n&\n/;tx;:x;s/\(\n.\)\(.*\)\(.\n\)/\3\2\1/;tx;s/\n//g;s/\(.\)/\1./g;s/$/ip6.arpa/')/

@ColinTaylor

This will expand the prefix first before using sed. Can you verify if it works?
Looks good to me. :)
 
Looks good to me. :)
It took me a while to get it worked out. And the expansion still doesn't go the full /128, but i figured we didn't need it since we are talking about the wildcard features which means "less" length covers "more".

for giggles , If any one wants the full 128 expansion, you can get it with this.


Code:
local=/$(nvram get ipv6_prefix | awk -F: '{for(i=1;i<=NF;i++)x=x""sprintf (":%4s", $i);gsub(/ /,"0",x); printf x; print ":0000:0000"}' | cut -c 2- | sed 's/://g;s/^.*$/\n&\n/;tx;:x;s/\(\n.\)\(.*\)\(.\n\)/\3\2\1/;tx;s/\n//g;s/\(.\)/\1./g;s/$/ip6.arpa/')/
 
Hopefully OP got a solution one way or another, I have an off topic question since we are talking about PiHole now.
@SomeWhereOverTheRainBow, is there any way you have found to have "friendly" client names listed in Pihole, instead of the just the hostnames, when NOT using it as the DHCP server? Example instead of amazon-hdas568567 I want it to say "Kitchen Echo Show". I want to bind the names to the MAC, not the IP, since the IP may change.
I did! I appreciate all the help, I haven't implemented this yet but I think I have an idea
 
I did! I appreciate all the help, I haven't implemented this yet but I think I have an idea
I had to adjust things alittle bit because the original sed for IPV6 prefix was assuming the prefix was already expanded, which isn't the case for everyone. Thanks to @ColinTaylor for providing the extra knowledge, we were able to come up with expansion before sed.
 
So for the friendly host names, the tip about using dhcp-host worked perfectly and better than expected. Not only is adguard and pihole picking it up but also the router uses it in the wireless log section and Im sure other areas as well, instead of the sometimes garbage hostnames the devices provide.

I just put some lines in '/jffs/configs/dnsmasq.conf.add' to test it out. I might eventually move the list to another file and specify that with dhcp-hostsfile. Thinking about possibly making a script that will convert the custom clientlist info into the dhcp-host format and dump it into a file. I already have a script that parses the clientlist nvram variable into a more readable format.

Example for /jffs/configs/dnsmasq.conf.add to tie a hostname to only a MAC without giving it a static IP.
Code:
dhcp-host=64:16:66:XX:XX:XX,Nest-Thermostat
dhcp-host=14:0A:C5:XX:XX:XX,Kitchen-Echo-Show
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top