Connecting to public WiFi hotspot in Linux: Server not found

The fancy hotel I was in at a conference was using a captive portal to enforce login for their free WiFi hotspot. For some unknown reason, likely a configuration mess-up in their inherently-broken Microsoft-based architecture, my browser couldn't present me with a login screen but instead reported a connection reset, usually indicative of a firewall reject rule.
It worked perfectly on Macs and Windows, so poor me running Linux, eh?

I fixed it, albeit perhaps suboptimally, with the following 1-minute hack:
Knowing a bit of networking, I needed to find the gateway's IP. One can either use ip, route, or even ifconfig for that. My IP was and the gateway's, as provided by ip route command, I put the gateway IP in the browser and was redirected to hotspot.plaza.local, which this time resulted in standard server-not-found error, indicative of a DNS failure. I didn't do much digging, but I figured hotspot.plaza.local and were the same machine, but as is normally so, the server was configured to only answer on its virtual hostname, not the IP.
So I added the following entry to /etc/hosts file:    hotspot.plaza.local

Afterwards, everything worked out as it was supposed to, except my relationship with Google Academy. Apparently, they don't necessarily greet an advantage-taking hacker in their ranks. :(


As later thoroughly diagnosed, the problem was coorchestrated by:
The solving fix is to
$ sudo service avahi-daemon stop
and, if running NoScript, temporarily disable ABE.

1 comment: