Get Ubuntu To Connect To Starbucks WiFi (Captive Portal)

To start you need another device to get the Starbucks Captive Portal DNS IPs.

For example with my iPhone I go to Settings > “i” in the circle on the right of “Starbucks WiFi” > Configure DNS

Step by step… with little images :~)

Go to Settings

Make sure your WiFi is connected to “Starbucks WiFi”

Click on the blue circle with the “i” in it

Scroll down you should see the DNS option

Then you should be able to see the two DNS IPs

Now that you have the two DNS IPs, you will now go to the network settings on your Linux (Ubuntu) system. They are many ways to access the network settings. You can easily find those ways online.

Since I use i3wm I will show you how I access it.

Since the way to clear DNS cache might vary between Linux distros, you might need to search online on how to do it on your system.

Here are some of the commands I use:

You can always restart your network service on your system:

If it still fails.

Try mapping the IP of Starbucks to the domain that Starbucks uses for their Captive Portal. Where I am located the domain is: secure.datavalet.io

To get the IP to map to secure.datavalet.io use this command (make sure you are connected to the “Starbucks WiFi”, first ;) ): ip route

The first line of the result of the command “ip route” should give you an IP that is used by the WiFi router.

Then in your /etc/hosts file add this line:
10.0.9.1 secure.datavalet.io

Again, those values might be different for you.

Hopefully this helps!

In the future I might write up a shell script to automate this… Maybe even an Docker container that will handler all of this :-0.

WARNING! By using StarBucks DNS they will be able to track your internet activity. You might want to look into getting a VPN. ;)

--

--

Just a Dev (http://jean-nicolas.com/)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store