How to make dnsmasq on turris resolve

Dear All,

I have an Omnia Turris running as DNS/DHCP server on my home network (with IP WAN connection is provided by an Fritzbox DSL modem on IP Omnia connects through LAN to the Fritzbox. To configure the Fritzbox you usually type “” inside the browser. This does not work with dnsmasq, I guess due to enforcement of “.lan” search domain. Can you help me making dnsmasq make resolve “” to ?

This is my “/etc/config/dhcp”

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option localservice '1'
        option port '0'
        option resolvfile '/tmp/resolv.conf.d/'
        option tftp_root '/srv/tftp'
        option enable_tftp '1'
        option dhcp_boot 'lpxelinux.0'
        option expandhosts '1'

config dhcp 'lan'
        option interface 'lan'
        option leasetime '12h'
        option start '110'
        option limit '89'
        option ra_management '1'
        option force '1'
        list dhcp_option '3,'
        list dhcp_option '6,'
        list ra_flags 'none'

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 host
        option mac 'B4:2E:99:3D:D4:4A'
        option name 'MyPC'
        option dns '1'
        option ip ''

This is the network setup on my Turris, DNS-Request are forwarded to the Fritzbox:

# cat /etc/config/network

config interface 'loopback'
        option proto 'static'
        option ipaddr ''
        option netmask ''
        option device 'lo'

config globals 'globals'
        option ula_prefix 'fdb6:5776:c046::/48'

config interface 'lan'
        option proto 'static'
        option netmask ''
        option ip6assign '60'
        option _turris_mode 'unmanaged'
        option ipaddr ''
        option gateway ''
        option broadcast ''
        option device 'br-lan'
        list dns ''
        list dns_search 'lan'

config interface 'wan'
        option proto 'none'

config device 'br_lan'
        option name 'br-lan'
        option bridge_empty '1'
        list ports 'lan0'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'
        list ports 'eth2'
        option type 'bridge'

config device 'br_guest_turris'
        option bridge_empty '1'
        option type 'bridge'
        option name 'br-guest-turris'

Here are some things that I’ve tried, without success:

  • add “” to /etc/hosts
  • add a static host entry to /etc/config/dhcp (through turris web gui)
  • add DNS forward “/box/” to /etc/config/dhcp (through turris web gui)
  • add DNS forward “/” to /etc/config/dhcp (through turris web gui)

I hope you guys have some more ideas on how to make turris resolve or forward “”.

Thank you in advance!

DNS on Turris is not done by dnsmasq, at least not by default.

Setting up in /cgi-bin/luci/admin/network/hosts should work I think (they’ll get suffixed by .lan or whatever other suffix you choose in reForis). But there are some other ways, too: Knot resolver (i.e. kresd) - DNS advanced settings for Omnia and MOX [Turris wiki]

Thank you for that link, this solved my problem!

I enabled the hosts-files by including it into by adding:

list hostname_config '/etc/hosts'

into the

config resolver 'kresd


of the


file. In the hosts-file I added: fritz

Then I restarted the kresd service, now it works.

I don’t know, if the standalone fritz and the finalizing dot at the end are really necessary (probably not), but it works anyway.

Final dot after (each) name don’t make any difference here. (at least if it parses but I believe it would) You defined two names for the address; any count is possible.

By the way, .box top-level domain does exist in official DNS tree. currently does not, but that part can at least theoretically change at any arbitrary moment.

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