Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Generate IPv6 hostnames from DHCPv4 lease hostnames
« previous
next »
Print
Pages: [
1
]
Author
Topic: Generate IPv6 hostnames from DHCPv4 lease hostnames (Read 1051 times)
ritztro
Newbie
Posts: 3
Karma: 0
Generate IPv6 hostnames from DHCPv4 lease hostnames
«
on:
November 24, 2022, 07:04:39 am »
Hi!
I recently setup an OPNsense router for my home network. Lately, I've been trying to configure IPv6 support. One thing I've noticed is that IPv6 addresses on my local network lack hostnames. After doing some reading, I've noticed this is common/expected and a common complaint with IPv6.
Since IPv6 clients aren't required to register a hostname when requesting an address (in DHCPv6) and don't even request an address with SLAAC, I was curious if there was some mechanism to automatically generate hostnames for IPv6 addresses on a local network (particularly SLAAC based addresses since this would also support Android devices).
I found
ip6neigh
, which is a tool available to OpenWrt users to generate IPv6 hostnames from corresponding IPv4 DHCP leased hostnames (if available). Is there anything similar for OPNsense? I've heard maybe Dnsmasq has a hacky implementation to support this?
I'm imagining something that can generate hostnames for local IPv6 addresses and then supports automatic registration with a local DNS resolver, like Unbound.
Would this even be possible/useful for devices that use privacy extensions? I think ip6neigh might try to grab all IPv6 addresses associated with a device (?) and hope it finds a stable one (based on the device MAC), associating the other IPv6 addresses with that address, and using the MAC to do an IPv4 lease hostname lookup.
Edit: I wanted to note that my network works fine, this is more of a usability/ease-of-use focused question (e.g. using rDNS to see hostnames in reports/logs/stats/etc rather than ipv6 ips)
«
Last Edit: November 24, 2022, 03:55:03 pm by ritztro
»
Logged
ritztro
Newbie
Posts: 3
Karma: 0
Re: Generate IPv6 hostnames from DHCPv4 lease hostnames
«
Reply #1 on:
November 24, 2022, 05:01:19 pm »
Assuming this doesn't already exist, I've explored this a bit more. I think a simple solution might be to scrape the NDP table for MAC address <-> IPv6 address associations, do a DHCPv4 hostname lookup using the MAC, and then register the mapping with Unbound.
Will the NDP table be comprehensive (i.e. contain every local IPv6 address that is handled by the router)?
Edit: This seems a bit closer to what I'm looking for, but I think scanning for packets isn't required if this is run on the router:
https://github.com/gpailler/snifipv6
«
Last Edit: November 24, 2022, 11:47:38 pm by ritztro
»
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Generate IPv6 hostnames from DHCPv4 lease hostnames