I use Ubuntu 17.10 and regularly encounter problems whilst connecting to public WiFi networks, especially those redirecting to a login portal.

When working on my personnal network, /etc/resolv.conf contains a nameserver pointing to, which (if I'm not mistaken) corresponds to the systemd-resolved service. And it works really well.

On a public Wifi, for some reason, this doesn't seem to help, and when trying to reach a page with Firefox, it loads for a long time before telling me it couldn't find the URL I gave it.

Right now, I figured this situation out by:

  1. Setting dns=none in /etc/Networkmanager/Networkmanager.conf

  2. Disabling the systemd-resolved service: sudo systemctl enable systemd-resolved.service

  3. Restarting network-manager: sudo service network-manager restart
  4. Manually filling /etc/resolv.conf, I first need to enter the IP of the public router as nameserver. This loads the portal when entering the router's IP in Firefox. Then, I login.

    #Generated by NetworkManager
  5. Edit /etc/resolv.conf back with public DNS adresses (usually

    # Generated by NetworkManager

After this procedure, I never encountered any problems for the rest of the session, but I wanted to know if there was a not so painful way to fix this annyoing problem. I know dnsmasq exists, but didn't use it for a long time since it conflicted regularly with my university's VPN.

I've kind of figured out how Ubuntu (and Linux in general) work by myself every time a new problem appears since I installed it, so if you couldn't get too deep in technical details, I would appreciate! :)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.