Perhaps some of you have already run into this problem when Dnsmasq was to be used as a separate DNS/DHCP server on a host with an extra network interface:
$ sudo systemctl status dnsmasq [...] Sep 06 14:32:22 office-gateway dnsmasq[830]: failed to create listening socket for port 53: Address already in use Sep 06 14:32:22 office-gateway dnsmasq[830]: FAILED to start up Sep 06 14:32:22 office-gateway systemd[1]: dnsmasq.service: Control process exited, code=exited, status=2/INVALIDARGUMENT Sep 06 14:32:22 office-gateway systemd[1]: dnsmasq.service: Failed with result 'exit-code'. Sep 06 14:32:22 office-gateway systemd[1]: Failed to start dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server. [...]
By Thomas Leister2024-09-06https://blog.zero-iee.com/en/posts/dnsmasq-startup-error-with-systemd-resolved/ Thomas LeisterOn one of our Raspberry Pis with Raspbian “Buster” image we had a strange problem in combination with a USB mobile stick: The Wireguard VPN client could not connect correctly to the Wireguard server again and again when starting the Pi. The error log said that the hostname of the Wireguard server could not be resolved in the client configuration.
A possible cause for this could be that at the time the Wireguard server was started, the internal DNS resolver of the mobile stick (NAT/router operation) was not yet operational and resolution failed because of this. To confirm the theory and fix the error, a default name server should now be introduced, which is always the same regardless of the network connection and is available immediately.
By Thomas Leister2023-06-12https://blog.zero-iee.com/en/posts/set-default-dns-resolver-for-dnsmasq-on-raspbian-buster/ Thomas Leister