Hi all
I’m using DNS over TLS with Quad9 as my DNS provider.
This works great in most circumstances, but when I want to connect to a public wifi, like at school or in the library, it’s not possible to open the Captive portal page, and I can’t use the network.
Is there some way to easily make this work? Maybe exclude these networks from private DNS?
Or a way to easily switch between network configurations?
I’m using systemd resolved, but configured with a private dns via my NixOs configuration.
I have Fedora on my laptop. I’ll often connect to my VPN and then manually change the DNS. Annoying, but usually works.
Another method if I’m using said WiFi for long periods of time is to use my travel router. Log into the portal on my laptop and then change the MAC of the router to that of my laptop and put it in repeater mode. Then connect the laptop to the router. Equally as annoying, but worth it.
Disable your dns over tls so you can register your MAC address and complete the portal requirements. Once registered, turn your dns back on.
This is the most straightforward way if I was not on NixOs.
If I want to change the DNS settings in my nix config, I need internet connection (unless it’s possible to rebuild while offline?)
I was trying to bypass this by just changing the DNS server for that specific network connection, but I didn’t get it to work. Because it has to use the DNS of the captive portal to be able to load the page
- Disable DNS once. Find out URL/IP of captive portal that way.
- Add to hosts file (Win/Lin/Mac). Maybe even give an alias: “captive-school”, “captive-library”, etc.
- Turn DNS back on. The hosts file will take prerogative over DNS settings, i.e. it is resolved first.
This could be a good option for the library actually.
Maybe I can just check the IP via my phone, then add it to the hosts of my laptop.I’ll give that a try
A bit cumbersome if you are traveling and using a different public wifi every time though
A bit cumbersome if you are traveling and using a different public wifi every time though
You’re not wrong. But you’re probably also familiar with the “secure vs. convenient” dichotomy: the closer to the “secure” end of the spectrum you get, the more cumbersome things will inevitably get. If you feel like you’re jumping through too many hoops and you don’t know what for, chances are you’re overshooting the target in terms of your threat model and might get away with doing less.

