Dns requests doesn't resolve with dnsmasq

Hardware: VPS bought online
YunoHost version: 11.2.10.3
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

My Yunohost instance can’t resolve domain requests since few updates back. It affects everything as I can’t even ping google.com or apt-update/upgrade anything.

The problem went away when I add Google DNS manually to /etc/resolv.conf but that’s not a permanent solution. It already has nameserver 127.0.0.1 entry.

I tried yunohost tools regen conf -f, and somehow it always shows /etc/resolv.dnsmasq.conf as changed - which I don’t touch at all.

Diff check goes like: https://paste.yunohost.org/raw/odukefagov

Any leads from here?

Hi Kabraxist,

Welcome to the forums!

I don’t have a direct solution or clear troubleshoot for you, only some observations:

  • My yunohost tools regen-conf -d dnsmasq returns about the same results as yours. Even after just before running the -f option and restarting dnsmasq.
  • Is your VPS running on Hetzner infrastructure, by coincidence? I recall reading some threads somewhere with strange DNS trouble in their network, but I can’t recall the specifics. Seeing the size of their dacacenters, it would be widely known if there were structural problems with their DNS though.
  • Does adding an alternative DNS server to /etc/resolv.dnsmasq.conf alleviate the problems? Or do you really have to put it in /etc/resolv.conf directly for DNS to work?

Does your /var/log/syslog post anything useful when restarting dnsmasq? Mine does

tail -f /var/log/syslog
Mar 24 11:07:48 online systemd[1]: Stopping dnsmasq - A lightweight DHCP and caching DNS server...
Mar 24 11:07:48 online systemd[1]: Reloading Postfix Mail Transport Agent (instance -).
Mar 24 11:07:48 online dnsmasq[3134220]: exiting on receipt of SIGTERM
Mar 24 11:07:48 online postfix[3134489]: Postfix is running with backwards-compatible default settings
Mar 24 11:07:48 online postfix[3134489]: See http://www.postfix.org/COMPATIBILITY_README.html for details
Mar 24 11:07:48 online postfix[3134489]: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
Mar 24 11:07:48 online systemd[1]: dnsmasq.service: Succeeded.
Mar 24 11:07:48 online systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server.
Mar 24 11:07:49 online systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Mar 24 11:07:49 online postfix/postfix-script[3134502]: refreshing the Postfix mail system
Mar 24 11:07:49 online systemd[1]: Reloaded Postfix Mail Transport Agent (instance -).
Mar 24 11:07:49 online postfix/master[3127879]: reload -- version 3.5.24, configuration /etc/postfix
Mar 24 11:07:49 online postfix/anvil[3134432]: statistics: max connection rate 1/60s for (smtp:87.120.84.100) at Mar 24 11:07:13
Mar 24 11:07:49 online postfix/anvil[3134432]: statistics: max connection count 1 for (smtp:87.120.84.100) at Mar 24 11:07:13
Mar 24 11:07:49 online postfix/anvil[3134432]: statistics: max cache size 1 at Mar 24 11:07:13
Mar 24 11:07:49 online systemd[1]: Reloading Postfix Mail Transport Agent.
Mar 24 11:07:49 online systemd[1]: Reloaded Postfix Mail Transport Agent.
Mar 24 11:07:49 online dnsmasq[3134517]: started, version 2.85 cachesize 256
Mar 24 11:07:49 online dnsmasq[3134517]: compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP DHCPv6 no-Lua TFTP conntrack ipset auth cryptohash DNSSEC loop-detect inotify dumpfile
Mar 24 11:07:49 online dnsmasq[3134517]: reading /etc/resolv.dnsmasq.conf
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 84.200.70.40#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 185.233.100.100#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 89.234.141.66#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 80.67.169.40#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 2001:910:800::40#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 185.233.100.101#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 194.150.168.168#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 2001:1608:10:25::9249:d69b#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 195.160.173.53#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 2a01:3a0:53:53::#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 2001:67c:28a4::#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 2a00:5881:8100:1000::3#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 91.239.100.100#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 80.67.169.12#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 84.200.69.80#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 2a0c:e300::100#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 2001:1608:10:25::1c04:b12f#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 2a0c:e300::101#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 89.233.43.71#53
Mar 24 11:07:49 online dnsmasq[3134517]: using nameserver 2001:910:800::12#53
Mar 24 11:07:49 online dnsmasq[3134517]: read /etc/hosts - 8 addresses
Mar 24 11:07:49 online systemd[1]: Reloading Postfix Mail Transport Agent (instance -).
Mar 24 11:07:49 online systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server.

2 Likes

Having DNS servers on /etc/resolv.dnsmasq.conf helped, thanks a lot.
And no, I’m not on Hetzner :slight_smile:

2 Likes

Hi Kabraxist,

Great, thanks for letting know that!

If you find the time, could you mark your thread “solved”, to help another forum member find a solution to their problem?