I had a weird problem recently that I solved, and it was mostly due to my mis-configuring of my Ubuntu laptop. I finally figured it out when setting up my new Dell XPS Developer Edition laptop, so I wanted to share.
The situation: I would go to my local library and couldn’t connect to their wireless internet. But if I disabled dnsmasq and restarted the network-manager service, it would work fine.
What I didn’t realize was happening is dnsmasq was taking over local DNS control from the systemd-resolved service. What is systemd-resolved and why is it important? The man page reads:
systemd-resolved is a system service that provides network name resolution to local applications. It implements a caching and validating DNS/DNSSEC stub resolver, as well as an LLMNR and MulticastDNS resolver and responder.
My library uses a captive portal. When you connect to their network it brings up a page that makes you agree before actually being able to use the network. systemd-resolved has all the know-how to handle that – dnsmasq doesn’t.
I love dnsmasq and don’t want to lose it’s functionality. I want to use both the system resolved (pronounced resolve-D) and dnsmasq. Here’s how to have your cake and eat it too.