OpenWrt Forum Archive

Topic: DHCP "hostrecord" config in LuCI for rDNS?

The content of this topic has been archived on 6 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I was having an issue with rDNS records not being generated for my statically-configured hostnames, and after some digging I found that the "Hostnames" page in LuCI creates "config domain" entries in /etc/config/dhcp, which get converted to "address=" lines in dnsmasq.conf, instead of "host-record=" (as address in this changeset). "config hostrecord" entries are turned into "host-record=", but I don't see anywhere to configure hostrecords in LuCI. Am I just missing something?

(Last edited by Tolstyak on 31 Jul 2014, 01:36)

It should also be mentioned that, as things currently are, no rDNS records are created for hosts created in LuCI. I'm assuming this isn't the desired behavior.


Add an "option dns" directive which appends an entry to
/tmp/hosts/dhcp to facilitate forward and reverse DNS lookups. For
instance, this item:

    config host

        option ip ''
        option mac '00:13:57:9b:df:02'
        option name 'winpc'
        option dns '1'

will add a corresponding entry to /tmp/hosts/dhcp: winpc.lan

This keeps the hostname/IP/MAC in a single place, for easy maintenance.

Then the issue is that LuCI isn't creating "config host" entries, but "config domain" instead.
Edit: correction: "config host" is for DHCP clients. Instead of "config domain" sections, LuCI should be creating "config hostrecord".


From /etc/config/dhcp:

config domain
        option ip ''
        option name 'server'

config domain
        option ip ''
        option name 'qbserver'

config domain
        option ip ''
        option name 'custvpn'

From /tmp/etc/dnsmasq.conf:


/tmp/hosts/dhcp contains only "# auto-generated config file from /etc/config/dhcp"

(Last edited by Tolstyak on 31 Jul 2014, 15:50)

The discussion might have continued from here.