balena-os / meta-balena

A collection of Yocto layers used to build balenaOS images
https://www.balena.io/os
968 stars 115 forks source link

dsnmasq config prevents plain hostnames from being resolved #1083

Open andymadge opened 6 years ago

andymadge commented 6 years ago

Dnsmasq is configured to never forward plain hostnames (ie. ones without a dot or domain) to the upstream DNS server.

This means that resin (and any containers) are unable to resolve any plain hostnames, since dnsmasq refuses to look them up.

https://github.com/resin-os/meta-resin/blob/ff0e3716e58c48ecd31a5e46d13a68a880507518/meta-resin-common/recipes-connectivity/dnsmasq/files/dnsmasq.conf#L20-L27

The explanation in the comments is correct ONLY if dnsmasq would send dns requests to a public DNS server. Most consumer routers will do DNS forwarding themselves, so in these cases dnsmasq would be sending requests to an internal DNS server not a public one.

This internal DNS server is usually the only one capable of resolving local hostnames, blocking requests to it causes problems for many people. People are experiencing the problem in the forum.

Removing the domain-needed line should fix the issue and will enable resin and containers to lookup plain hostnames.

floion commented 6 years ago

@agherzan @ZubairLK ^ (cc @imrehg in case you are interested in the problem)