12 Mar 2017 : Wifi please?
Here I am on Virgin America 29 to San Francisco, excited to be on my way to SRECon. I’ve got a 20 minute speaker slot first thing on Tuesday morning, and the last time I timed my talk it was around 21 minutes. That’s down from 45, so I’m doing pretty well, but I need to shorten it more, especially since the first session (8:30am!) might start late.
I’ve been planning to fix it on the plane, but my laptop will stubbornly not get on the wifi. So it’s debugging time.
I do the usual shuffle to turn off the proxy and hit up a url that doesn’t speak http, so the captive portal will intercept. It does, but the browser is all airborne.gogoinflight.com? Never heard of it.
Is it a browser thing? I try a shell:
$ telnet airborne.gogoinflight.com 80 telnet: could not resolve airborne.gogoinflight.com/80: Name or service not known
$ dig airborne.gogoinflight.com [...] ;; connection timed out; no servers could be reached
Bah. When I connect to a wireless network, I get an IP address using DHCP. That can set a nameserver too. How is that set, in practice? Does it update /etc/resolv.conf? I resolve (DNS joke there) to find out when I have internet access. (Later: yes it does.)
How can I get the IP of the portal? Well, I have another device, my phone. I used to have a terminal emulator on there, but I took it off a while ago when I was cleaning up apps. Once you’ve played with it for a while, it has no real purpose, right? WRONG. This would have been your moment, terminal app! Luckily for me, my phone provider gives me an hour of free wifi while flying, so I hop on there and download the first terminal app I find on the Play store.
ifconfig on both the phone and the laptop to compare IP addresses and
see if they’re on the same network. Yes, both have
The terminal app doesn’t have the
nslookup commands installed,
but I get lucky with my fourth try:
$ ping airborne.gogoinflight.com From 10.241.151.31: imcp_seq=2 Packet filtered
Add that to /etc/hosts on my laptop…
$ sudo vim /etc/hosts [...] 10.241.151.31 airborne.gogoinflight.com [...]
and back to the browser. Sorted. There’s the portal and now I can pay for wifi.
But they wanted $34 for the remainder of the flight and that’s just offensive so I ordered a beer and found other sources of entertainment instead. Wtf, Virgin America? $34?
Later that same flight:
Btw, here’s what was going on: my dhclient.conf was overriding the nameservers supplied by the DCHP server.
$ cat /etc/dhcp/dhclient.conf supersede domain-name-servers 184.108.40.206; [...]
Commenting that out solved the problem. At that point, I already had the /etc/hosts workaround, but I was still on a plane with a beer and nothing much else to do. Like I said, perfect debugging time.