Unable to access the Internet at Starbucks - used to work with Ubuntu 16.04
For close to 6 months I haven't been able to have access to the Internet with the Starbucks wifi.
Ubuntu sees the Wifi and is able to establish a connection. But then when I click access/accept... it does some redirection and then just doesn't do anything. It looks like it just hangs.
I suspect that it is a dnsmasq issue but I am unsure.
I used to have Ubuntu 16.04 now 17.10. When I had the older version the Internet worked perfectly. Not anymore.
- dnsmasq in Ubuntu 16.04 is 2.75
- dnsmasq in Ubuntu 17.10 is 2.78
I tried tcpdump
. I got more than 700k rows of logs out of it. Plus I don't understand most of it. Here is a sample:
18:04:26.564268 IP 10.0.9.137.49266 > 192.190.0.106.http: Flags [.], ack 20161, win 544, options [nop,nop,TS val 1641878439 ecr 315460744], length 0
18:04:26.564273 IP 192.190.0.106.http > 10.0.9.137.49266: Flags [.], seq 20161:21601, ack 1282, win 62, options [nop,nop,TS val 315460744 ecr 1641878430], length 1440: HTTP
18:04:26.564277 IP 10.0.9.137.49266 > 192.190.0.106.http: Flags [.], ack 21601, win 567, options [nop,nop,TS val 1641878439 ecr 315460744], length 0
18:04:26.564438 IP localhost.37212 > localhost.domain: 29983+ [1au] AAAA? starbucks-east.datavalet.io. (56)
18:04:26.564473 IP localhost.35985 > localhost.domain: 10794+ [1au] AAAA? starbucks-east.datavalet.io. (56)
18:04:26.564496 IP localhost.domain > localhost.46709: 30654 0/0/1 (56)
18:04:26.564514 IP localhost.domain > localhost.44492: 24516 0/0/1 (56)
18:04:26.564519 IP localhost > localhost: ICMP localhost udp port 44492 unreachable, length 92
18:04:26.564664 IP localhost.35882 > localhost.domain: 64112+ [1au] AAAA? starbucks-east.datavalet.io. (56)
18:04:26.564690 IP localhost.32892 > localhost.domain: 14648+ [1au] AAAA? starbucks-east.datavalet.io. (56)
18:04:26.564718 IP localhost.domain > localhost.48486: 47788 0/0/1 (56)
18:04:26.564737 IP localhost.domain > localhost.40167: 14148 0/0/1 (56)
18:04:26.564741 IP localhost > localhost: ICMP localhost udp port 40167 unreachable, length 92
18:04:26.564861 IP 192.190.0.106.http > 10.0.9.137.49266: Flags [.], seq 21601:27361, ack 1282, win 62, options [nop,nop,TS val 315460744 ecr 1641878430], length 5760: HTTP
18:04:26.564868 IP 10.0.9.137.49266 > 192.190.0.106.http: Flags [.], ack 27361, win 657, options [nop,nop,TS val 1641878440 ecr 315460744], length 0
18:04:26.564940 IP localhost.56634 > localhost.domain: 33651+ [1au] AAAA? starbucks-east.datavalet.io. (56)
18:04:26.564971 IP localhost.26306 > localhost.domain: 12045+ [1au] AAAA? starbucks-east.datavalet.io. (56)
The ICMP seems to be called a lot. Something is doing many pings on different ports.
Details about my system:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.10
Release: 17.10
Codename: artful
This might be related: The Problem with Connecting to Public WiFi on Linux - Medium
Another detail: sometimes I am able to get the Internet. But it's random.
Solution 1:
This tends to happen because places like Starbucks will use a captive portal, and not allow connections out (save some rare exceptions) until you authenticate with the network. In Starbucks' case, this means agreeing to a terms of service.
In your web browser, you may usually be able to navigate to any non-HTTPS domain (for example, http://captive.apple.com/
or http://www.msftncsi.com/ncsi.txt
, both of which are "captive portal" detection systems used by Apple and Windows, respectively).
In some cases, the captive portals will also block DNS requests going out. In this case, you can just directly connect to any IP address on the public net that isn't protected by HTTPS. I tend to use 91.189.91.23
, which is the IP address of Canonical's APT mirrors.
While you could change your DNS, there are some cases where this is undesirable and a privacy concern - for example, Starbucks tracking what sites you visit through DNS.
Solution 2:
My friend was able to resolve it.
In the settings for Starbucks WIFI go to IPv4 configurations tab.
Turn off Automatic for the DNS.
Then add these nameservers in the input: 10.0.9.1, 8.8.8.8, 8.8.4.4
10.0.9.1
might be different in other StarBucks. This IP is the one of the router.
UPDATE
You might need to modify: /etc/resolv.conf
With:
nameserver 8.8.8.8
nameserver 10.0.9.1
Again the 10.0.9.1
is the IP of the Wifi router.