Adding DNS entries doesn’t work

Hello,

I’m having trouble adding my own entry to hostnames. My understanding is that you just put an entry in Network/Hostnames and after restarting the dnsmasq service everything will work. But no.

  1. The software on the router is TurrisOS 6.5.2.
  2. the dnsmasq service was disabled by default, so I had to enable it and of course restart it (I restarted the entire router a few times.

I am sending the configuration from /etc/config/dhcp

I am now testing it from the MGMT network. Resolving the other records from the DNS server works fine, but I can’t get the IP addresses from the records I added in hostnames.

config dnsmasq
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option ednspacket_max '1232'
	option port '0'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	list dhcp_option '6,XXX.XXX.XXX.XXX,XXX.XXX.XXX.XXX'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

config dhcp 'Guest'
	option start '100'
	option leasetime '12h'
	option limit '150'
	option interface 'Guest'
	list dhcp_option '6,XXX.XXX.XXX.XXX,XXX.XXX.XXX.XXX'
	list ra_flags 'none'

config dhcp 'IOT'
	option start '100'
	option leasetime '12h'
	option limit '150'
	option interface 'IOT'
	list dhcp_option '6,192.168.40.1'
	list ra_flags 'none'

config dhcp 'SEC'
	option start '100'
	option leasetime '12h'
	option limit '150'
	option interface 'SEC'
	list dhcp_option '6,8.8.8.8'
	list ra_flags 'none'

config dhcp 'MGMT'
	option start '100'
	option leasetime '12h'
	option limit '150'
	option interface 'MGMT'
	list dhcp_option '6,192.168.99.1'
	list ra_flags 'none'

config domain
	option name 'test-test123.me'
	option ip '192.168.0.1'

config domain
	option ip '192.168.0.12'
	option name 'test-server.me'

config domain
	option name 'test.local'
	option ip '192.168.0.1'

On TurrisOS dnsmasq is only doing dhcp for DNS there is kresd.

I added list hostname_config '/etc/hosts'
In /etc/config/resolver in kresd section and added entries in /etc/hosts

2 Likes

Hi! Thank you very much, this method works. I will have to study the documentation in detail.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.