jow- / nlbwmon

Simple conntrack based traffic accounting
ISC License
158 stars 37 forks source link

Hostname lookup from dnsmasq dhcp-hostsfile #53

Open dandudikof opened 1 year ago

dandudikof commented 1 year ago

I run other linux/nonopenwrt dnsmasq servers and to keep it consisten and ease of managment on openwrt side i use addn-hosts and dhcp-hostsfile files for dnsmasq (instead of openwrt /etc/config/dhcp file).

addn-hosts file seems to be pickued up by nlbwmon for static ip to hostname lookups. But not dhcp-hostsfile for mac to hostname (unless there is a current lease).

I have duplicated dhcp-hostsfile to openwrts /etc/config/dhcp config in the past to get nlbwmon to lookup up the host names from mac addresses.

But would be nice if nlbwmon had an option to include dhcp-hostsfile as an additional custom lookup locations/format.

dhcp-hostfile(for dhcp assignments) uses single line "mac,ip,hostname" format ethers file can be used but only allows use of ip or hostname not both.

Also i use them because they can be reloaded after adding new hosts without restarting dnsmasq, by just sending a HUP or reload to dnsmasq. Unlike the standard openwrt /etc/config/dhcp config file which need full dnsmasq restart.

thank you

jow- commented 1 year ago

nlbwmon does not track any hostnames at all. Maybe you mean the LuCI frontend

dandudikof commented 1 year ago

Yes , LuCi interface that shows the associated names to macs or ips.