tsaylor
3
Thanks alzhao for your thoughtful reply! Yes, I think that my idea of a script that does some “scraping” looking for input fields could work for most portals but it would never be 100%. And using a different device such as a phone helps a bit but is still insecure during the initial phases. The router is really in the best position to handle this, so if we could somehow extend the “Force VPN” logic that would be excellent!
I like your suggestion that the router could check whether a captive portal exists (probably by checking whether connecting to some known site is actually being sent elsewhere), and then deny any traffic going to any other location. I haven’t studied captive portals enough to know the best approach, but it seems to me that we would need to allow access to only one DNS name (and/or IP address). The captive portal might be doing a redirect, so it may not be as simple as only allowing the browser to use one name/ip, but perhaps the router could make its own request (curl, etc) to determine that.
If you are willing to add something like this to the “Force VPN” support, that would be excellent! If not, then allowing us to extend that logic could also let us solve this (please let me know if there is already a way to hook into that logic and add a script – or is that more a matter of generating custom iptables rules? hmm, perhaps it is possible in that way, could be an interesting project)…