Hotel Wifi MacGyver

…Or how I bodged together an improvised wifi network with internet (edit: secure internet) access from our hotel room.

Standard Chromecast

I recently bought myself a Chromecast for taking with me when I travel. It is the simplest way to gain access to an extra screen since most hotel TVs have at least one spare HDMI port.

I can use it to:-

The only caveat is that you, ideally, need a dedicated wifi network.

Wifi Repeater, lost in the mess 🙁

Somewhere in the mess that is my workshop I have a plug-in wifi repeater/access point. I figured I could toss that in my bag and simply plug it in to the wall for an instant network. Unfortunately I could not locate it so I though “bugger it, the hotel should have wifi, maybe I can use that”.

Once we arrived we were issued with a wifi username and password, good for 3GB…

…but only two devices at any one time. 🙁

Our internet requirements aren’t particularly high. Kids’ iPods for the occasional iMessage to their Granny; wife’s phone and laptop in case she has brought some work with her; and some light browsing from my laptop and/or phone (or perhaps to write an article). The 3GB should be plenty but the two device policy is a bit restrictive. My first thought was “can I use my MacBook as a Hotspot?”

I, of course, already knew that I could, but could I get Internet connected as well? The first thing I looked for was an ethernet port on a wall somewhere. I was dismayed. Then I considered whether I could tether our laptops with an ethernet cable; connect one to the hotel wifi and use the other as a hotspot. I could possibly get it to work but getting Windows and Mac to play well together is hard enough, let alone fiddling with Windows on my wife’s corporate laptop. I decided to look to my mobile devices.

USB Tethering

I have a secondhand iPhone 4s, that I use as an iPod, and a Nexus 6P. I automatically look to Android first because that is usually where I will find a solution. I figured that I could USB tether my phone (6P) to my MacBook and then turn my MacBook into a hotspot. I plugged in my phone, selected USB tether…

…and nothing happened. Even attempting to use my mobile broadband via USB was impossible. A quick google search confirmed that USB tethering “cannot” work Android to Mac.

Over dinner I considered the iPhone. Surely a Mac would allow USB tethering from an iPhone. Another quick google search indicated it may work… but as it turns out, not for me. My “iPhone” doesn’t have a SIM card; I only use it as an iPod. Consequently I cannot even access a tethering menu. Back to the Nexus.

Above you may have noticed I said USB tethering “cannot” work. Did you notice the quotes? Well it turns out a bloke named “Joshua Wise” figured out a way to install a driver for Android USB tethering. He calls his driver “HoRNDIS” (pronounced horrendous).

You can download a copy of the HoRNDIS driver here and install it as you would any package for a Mac.

Once installed, reboot your Mac, plug in your Android phone, enable USB tethering and open Network Preferences on your Mac. You should see something similar to the image on the right. A nicely connected network service named after your phone.

Network Preferences

Feel free to test your connection. Open up Safari, try a google search. If you don’t have Internet try disabling and reenabling USB tethering (if you still don’t have internet, check you can access internet on your phone, if you can something must have gone wrong, 🙁 sorry).

I had wifi and 4G connected on my phone so I tried turning off Mobile Data. I still had Internet!! I was clearly connected to the hotel wifi via USB. The final step was turning my MacBook into a hotspot. The way to do that is as follows…

Turn on wifi and make sure you are not connected to a wifi network. If you are connected to a wifi network, disconnect from it. You might have to force your MacBook to “Forget” the network.

Open “Sharing Preferences”. In the white box on the left select “Internet Sharing”. In the “Share your connection from:” field select your phone connection. Then in the “To computers using:” field select “Wi-Fi”.

Sharing Preferences

Clicking on “Wi-Fi Options…” allows you to setup the wifi parameters. Choose:-

  • a Network Name,
  • the wifi channel,
  • the security (choose WPA2 Personal), and
  • a password.

Wifi parameters

Now you can start the hotspot. To do this, check the box next to “Internet Sharing” in the white panel on the left.

A message will pop up asking if you REALLY want to do this. I REALLY did want to do this so I clicked “Start”.

Start the wifi hotspot

As soon as I clicked “Start” a little green indicator lit up next to “Internet Sharing: On”. This little green indicator was very satisfying. I picked up my iPhone and connected to the wifi network “MacBook”. Not only did I have internet but my “iPhone/Pod” started syncing with my MacBook!

Internet Sharing: On

The final step was hooking up my Chromecast to the TV. A few clicks through Google Home and I was all done.

I was so pleased with myself I sat down to write an article about it…

Bonus Level!!

VPN Client Software

Since the Data Retention Laws were introduced I have been reading up about Internet privacy and security. Now dreading Man-in-the-middle attacks I began to avoid “Free Wifi”. To alleviate my fears I subscribed to a VPN service.

A VPN (Virtual Private Network) allows you to encrypt your data and connect to the Internet via a private network. The simplest way to connect to a VPN is to use client software. Once you sign into the client your Internet connection is routed through the VPN.

A happy side effect of using a VPN is that you occasionally get faster internet on “Public Free Wifi”. I think this is because the internet provider “shapes the traffic”, meaning they restrict the speed of your connection with respect to the content you are browsing. When connected to a VPN, all your traffic is routed through the same server so the provider cannot distinguish between content you are browsing. I do not know this for certain but here is an example of a speed test with my VPN switched off…

…and here is an example with it switched on…

Unfortunately by signing into my VPN on my MacBook, all devices connected to it lost Internet. I am fairly certain this is a limitation of the VPN Client Software. I am confident that manually configuring the VPN would allow it to extend to all devices connected to the MacBook hotspot but that is a project for another evening…

Another Evening

Sure enough, two small changes and we are in business. Add an L2TP VPN connection in Network Preferences and then share the VPN connection instead of the phone connection.

L2TP VPN Setup

Setting up the L2TP VPN connection connects the Mac to the VPN. If I continued to share the phone connection from above any device connected to my hotspot would be connected directly to the hotel wifi. Changing the internet sharing to the VPN connection moves the hotspot inside the VPN.

Sharing the VPN connection

This is handy because multiple devices can connect to one VPN connection. Subscriptions to VPN services usually only give you limited number of concurrent logins. e.g. my service only allows 5 concurrent logins.

So here ends my nerdy holiday article. I hope you have enjoyed reading it as much as I have enjoyed hacking it together.