Content of /var/etc/dnsmasq.conf.cfg01411c
# auto-generated config file from /etc/config/dhcp
conf-file=/etc/dnsmasq.conf
domain-needed
log-queries=extra
enable-ubus
expand-hosts
bind-dynamic
domain=example.com
server=8.8.8.8
server=8.8.4.4
dhcp-leasefile=/tmp/dhcp.leases
resolv-file=/etc/resolv.conf
stop-dns-rebind
dhcp-broadcast=tag:needs-broadcast
addn-hosts=/tmp/hosts
conf-dir=/tmp/dnsmasq.d
user=dnsmasq
group=dnsmasq
dhcp-ignore-names=tag:dhcp_bogus_hostname
conf-file=/usr/share/dnsmasq/dhcpbogushostname.conf
bogus-priv
conf-file=/usr/share/dnsmasq/rfc6761.conf
no-dhcp-interface=eth0
no-dhcp-interface=eth1
Content of /etc/resolv.conf:
# Interface wan
nameserver 127.0.0.1
search example.com
But when I query like this:
root@OpenWrt:~# nslookup www
Server: 127.0.0.1
Address: 127.0.0.1#53
*** Can't find www: No answer
*** Can't find www: No answer
It does not expand my query with the domain specified with search
option in etc/resolv.conf
. Did I make any mistake in the configuration or is there a issue with dnsmasq in OpenWRT?
dnsmasq version:
root@OpenWrt:~# dnsmasq -v
Dnsmasq version 2.80 Copyright (c) 2000-2018 Simon Kelley
Compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify dumpfile
This software comes with ABSOLUTELY NO WARRANTY.
Dnsmasq is free software, and you are welcome to redistribute it
under the terms of the GNU General Public License, version 2 or 3.
OpenWRT version:
root@OpenWrt:~# cat /etc/os-release
NAME="OpenWrt"
VERSION="19.07.2"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt 19.07.2"
VERSION_ID="19.07.2"
HOME_URL="https://openwrt.org/"
BUG_URL="https://bugs.openwrt.org/"
SUPPORT_URL="https://forum.openwrt.org/"
BUILD_ID="r10947-65030d81f3"
OPENWRT_BOARD="x86/64"
OPENWRT_ARCH="x86_64"
OPENWRT_TAINTS=""
OPENWRT_DEVICE_MANUFACTURER="OpenWrt"
OPENWRT_DEVICE_MANUFACTURER_URL="https://openwrt.org/"
OPENWRT_DEVICE_PRODUCT="Generic"
OPENWRT_DEVICE_REVISION="v0"
OPENWRT_RELEASE="OpenWrt 19.07.2 r10947-65030d81f3"