I'm trying to get luci display the hostname of associated WiFi stations, but the result is poor:
mostly, the 'hostname' result consists of a ipv4 address, a fe80:: address,
or simply a question mark ?
ipv4 addresses are resolved correctly.
I have a reverse DNS server for my ipV6 subnet and IPv4 subnet.
When I look at the reverse dns files of my 2a02:: ipv6 and ipv4 subnet, everything seems fine, PTR records are associated.
What do I need to do for luci to display hostnames? why does it print a ? or a fe80:: address?
If it shows only IP address, but no hostname, then reverse lookup doesn't work. Check your reverse DNS server logs to make sure these queries arrive there.
If you see "?", then you need something like arp-scan -qxlN -I br_lan in cron every minute to let it discover IPs.
Ipv6 link local addresses (fe80) are mostly not found in DNS because they are only valid on a links scope.
ULA valid for the whole network. If you have also a ULA prefix defined these addresses should be visible too.
However, some devices do not send a hostname so the DHCP server can not pass that information to the DNS server...
And yes please for effig sake, post your config files otherwise everyone needs to get his/her Cristalball out of the basement...
ip reverse lookup works.
ipv6 sometimes, sometimes luci simply provides a fe80:: ip instead of my regular 22a02:: ip.
can I map a fe80:: domain to my private 2a02:: reverse DNS domain?
something like (but this a forward zone to blacklist DNS domains):
cat null.zone
; BIND db file for ad servers - point all addresses to an invalid IP
$TTL 864000 ; ten days
@ IN SOA linuxserver.sollie.home.arpa. hostmaster.linuxserver. (
2008032802 ; serial number YYMMDDNN
28800 ; refresh 20 hours
7200 ; retry 10 hours
864000 ; expire 100 days
86400 ) ; min ttl 1 day
@ IN NS linuxserver.sollie.home.arpa
@ IN A 0.0.0.0
* IN A 0.0.0.0
would it be possible to make a similar file for reverse dns and map it with my public and link-local address?
I read somewhere that you can't do that when dynamic dns is in place
ok ... so how does that relate to luci ip resolving? how does it work?
Assuming this is a dumb AP, it only knows MAC addresses of connected clients. That's where ARP comes in. It maps MACs to IPs. You can force the discovery of this mapping with arp-scan or set your bridge network device to "Honor gratuitous ARP".
When IP is known, luci does a reverse DNS request to learn the hostname.
It is stored in the OS kernel.
I haven't checked the whole data path that results in luci displaying nice hostnames or at least IPs. There's an HTTP request that periodically asks for updated information. Server side at some point it needs to call something like ip neigh, arp -a etc. and then possibly nslookup some.ip.addr.here.
If you're really curios about the whole process, open browser developer tools, then Network tab and see what requests are getting send (+responses). Once you know request path, you can find strings on your router with grep -r search.term / to find a file that is potentially involved in handling the request.