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 127.0.0.53, 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:
[main] plugins=ifupdown,keyfile,ofono dns=none [ifupdown] managed=false [device] wifi.scan-rand-mac-address=no
Disabling the systemd-resolved service:
sudo systemctl enable systemd-resolved.service
- Restarting network-manager:
sudo service network-manager restart
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 nameserver 192.168.44.1
Edit /etc/resolv.conf back with public DNS adresses (usually 188.8.131.52)
# Generated by NetworkManager nameserver 184.108.40.206 nameserver 220.127.116.11
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! :)