Guest Wifi Login on Ubuntu
My laptop is still running Ubuntu 16.04LTS and I am running into some compatibility issues that are hopefully fixed in more up to date releases in 2020. One of these issues is logging into free guest WiFi, in this case of KPN.
Apparently the captive portal detection feature of Ubuntu, nor Chromium, succeeds in finding the correct page to connect to. I tried using route and traceroute to detect where I should point my browser, but the final solution seems simple: I use curl
This command line URL retrieval tool allows all kinds of tracing and debugging options and I ran it using:
curl -v http://18.104.22.168
This tries to access a webpage on one of the well-known Google DNS servers (which are, in practice, always accessible). The command outputs a trace to the page server that intercepts the network traffic and displays the guest login page. In my case:
Rebuilt URL to: http://22.214.171.124/ Trying 126.96.36.199… Connected to 188.8.131.52 (184.108.40.206) port 80 (#0) > GET / HTTP/1.1 > Host: 220.127.116.11 > User-Agent: curl/7.47.0 > Accept: / > HTTP 1.0, assume close after body > < HTTP/1.0 302 Moved Temporarily < Server: squid < Mime-Version: 1.0 < Date: Mon, 11 May 2020 08:00:14 GMT < Content-Type: text/html < Content-Length: 0 < Location: https://redirector.wifi.kpn.com/ < X-Squid-Error: 403 Access Denied < X-Cache: MISS from lnx-proxy01.kpnhotspots.local < X-Cache-Lookup: NONE from lnx-proxy01.kpnhotspots.local:80 < Via: 1.0 lnx-proxy01.kpnhotspots.local (squid) < Connection: keep-alive < * Connection #0 to host 18.104.22.168 left intact
Apparently this is running a Squid proxy server that manages the guest login. The correct redirection location is clear now:
Copying that to the browser location displays the correct login page.