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.

quoting https://dev.openwrt.org/changeset/40799

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 '192.168.0.10'
        option mac '00:13:57:9b:df:02'
        option name 'winpc'
        option dns '1'

will add a corresponding entry to /tmp/hosts/dhcp:

    192.168.0.10 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".

In LUCI:
http://i.imgur.com/ytxKBUq.png

From /etc/config/dhcp:

config domain
        option ip '10.0.0.10'
        option name 'server'

config domain
        option ip '10.0.0.33'
        option name 'qbserver'

config domain
        option ip '10.0.0.34'
        option name 'custvpn'

From /tmp/etc/dnsmasq.conf:

address=/server.securecominc.com/10.0.0.10
address=/qbserver.securecominc.com/10.0.0.33
address=/custvpn.securecominc.com/10.0.0.34

/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.