Unbound & odhcp local LAN DNS resolve only with fqdn [17.01.2]

If nslookup amilo I get a ** server can't find amilo: NXDOMAIN

If I use amilo.lan it got resolved.

Anyone got an idea?

config unbound
    option dns64 '0'
    option domain 'lan'
    option domain_type 'static'
    option edns_size '1280'
    option hide_binddata '1'
    option listen_port '53'
    option localservice '1'
    option manual_conf '0'
    option protocol 'ip4_only'
    option query_minimize '0'
    option rebind_localhost '0'
    option rebind_protection '1'
    option recursion 'passive'
    option resource 'small'
    option root_age '9'
    option ttl_min '120'
    option unbound_control '1'
    option validator '0'
    option enabled '1'
    option dhcp_link 'odhcpd'
    option dhcp4_slaac6 '1'
    option add_local_fqdn '3'
    option add_wan_fqdn '0'

@EricLuehrsen I looked&tried hard but couldn't find a clue. It would be great if you find time to throw a thought at it.

I don't know why this didn't email me before. I will attempt to respond now. I tried this myself on LEDE master and a Ubuntu machine remotely and it worked. Is it possible that your local machine dnsmasq (usually used by gnome network-manager) or other dns cache is configured to block upstream without fqdn. That is raw host names may be in /etc/hosts but will not be searched on the wire.

1 Like

Hallo Eric,
thank you for taking your time to investigate and get me going again and check more thorougly by myself ;- ) Although without much information looks like you nailed it...

  • Windows name resolution is working as expected

  • router hostname can be resolved from both, windows and linux clients

  • different linux client can't resolve hostname only

Will check the (out of the box?) configuration of one ubuntu 16.04 machine and another debian derivative.

PS: I would have sworn that also windows wasn't working as I tested so I expected it was the routers fault. Sometimes one can get a little confused after changing this and that and thisthat and than revert thatthis ;- )

Not as obvious to me than I hoped it would be. No hosts defined in etc/hosts

on the debian derivative:

@amilo:/$ hostname
amilo
@amilo:/$ domainname
(none)
@amilo:/$ hostname -A
amilo.lan
@amilo:/$ hostname --fqdn
hostname: Name or service not known

ubuntu will follow...

As a workaround I added domain lan to resolv.conf on the linux clients

...but it will be overridden by network manager ;- )

...so I ended up adding lan as a local search domain in the network manager GUI