Using the Google Chromecast behind a VPN

VPN services are essential tools that are not only adept at helping us to protect our privacy on the internet but are also effective at circumventing restrictions like those mentioned previously in our how to VPN post. Whether these barriers are imposed by corporate policies and company firewalls in the office or they are of the arbitrary content blocking by IP nature common with online streaming services, a VPN is the ideal candidate to overcome such pesky limitations.

If you are already familiar with this concept and just want to know how to get the Chromecast working feel free to skip to the tutorial section further down. Otherwise read on.

VPNs by design tunnel traffic originating from one network through machines on another network or an array of networks before those packets reach their final intended destination. The upside here is that by adding encryption one can ensure that their communication remains truly anonymous and private. However, for most users the real benefit is that this mechanism can fool many online services such as Netflix, Hulu etc into treating you and your requests as if they are made from another country outside of your present physical location.

This is particularly useful for users who want to get around the nuisances associated with the unavailability of certain features or services in their present region or the anemic content libraries presented even when those services are available. For instance, if you chose a VPN service that provides servers in the United States that relay your internet traffic then this instantly allows you to view everything just as a regular US consumer would. Basically, as far as Netflix or any other internet service is concerned when the packet belonging to your request reaches them it comes from a computer based in the USA. There you have it. Viola! a world of content and possibilities is now open purely due to the use of a VPN. For the uninitiated this user choice Best of Five poll from 2014 done by Lifehacker lists some good VPN providers.

However, notwithstanding their benefits VPNs have three main disadvantages associated with them. The first is that some speed will be sacrificed because you are essentially taking a longer route to the end destination by relaying traffic through a middle man. Fortunately, any speed drawbacks can be mitigated by selecting a decent provider from the list above and or sacrificing privacy by reducing your encryption or altering your connection method/protocol.

The second drawback is that it can be too technical an endeavour for some to configure their devices to connect to the VPN service. Again our how to guide here will alleviate this to some extent. Luckily, most providers are addressing the usability issues and have native apps for desktops, laptops, smartphones, TVs, tablets and even routers which is taking some of the hassle out of the setup. However, the final hassle is the big one and that is convenience. It can be downright inconvenient on occasion to use a VPN especially when one needs to inter operate with other devices around the home or office that are not connected to the VPN service.

It is this inconvenience challenge that will be addressed in the remainder of the article. Specifically, you will be shown how to stream content from a VPN connected device (Laptop, phone etc) to your TV using the Google Chromecast. Don't know what a Chromecast is? Read about it on this page.

Also, given that it is a relatively cost effective way to get streaming content on the big screen for those without a smart TV you may also want to Buy One.

Ok, now that you have VPN and bought a Chromecast let's get started with the tutorial.

Getting the Chromecast working behind a VPN

By default the Chromecast will not work when you are streaming from a device that is on a VPN. The reason for this is simple. A Chromecast device requires communication between it and the other devices on the same network. If it cannot speak to those devices then there is no way to command it go on the internet and fetch the relevant content. When you have connected your computer or other handheld device to the VPN it and the Chromecast are effectively on two separate networks and can no longer talk to each other.

Even if it were somehow magically possible (it is not at least for the time being) for them to communicate without being on the same network you would still have the problem of the casting happening from the Chromecast outside of the VPN which would mean that it cannot be done securely and that it would also not be able to fetch the restricted material for which you have the VPN in the first place.

There are three ways around this, the first and recommended way is to cast using a chrome tab, second to connect the home router to the VPN and third to use an ad-hoc wireless networked to share the VPN. The first method is by far the easiest but if you are hardcore and decide to try to other two then both require connecting the Chromecast to the VPN service. The first is to configure the home router to connect to the VPN thus putting everything on the home network over the VPN including the Chromecast. This is certainly effective but most people either do not have a home WiFi router capable of establishing a VPN tunnel or the feature is omitted from the user interface even if the underlying hardware supports it. To get around that you would need to flash the router using custom firmware either of the DD WRT or Tomato variety.

Most end users are too scared to take the risk of nuking their router by flashing it with community firmware or have none and do not want to have any of the technical capabilities needed. This post is mostly for those people. Although, unfortunately there is still some technical tasks required.

Basically, to get your Chromecast on a VPN you will need to setup an ad-hoc hotspot using your laptop. This hotspot will forward traffic over your VPN connection and it is this hotspot that the cast will connect to. In Windows terminology these hotspots are known as hostednetworks.

Configuring a Wireless Hosted Network

Again, the recommended and easy method is to follow what is detailed here. However, if you are very technically talented and want to try something slightly more satisfying and way more challenging then read on.

  1. Open a Administrative Command Prompt on Windows.Command Prompt Run as administrator

  2. Type netsh wlan show drivers at the prompt. Ensure that the driver property labelled Hosted network supported has a value of yes associated with it. Hosted network supported Should the value not show a yes then it means that your laptop wireless card is not able support creating the hotspot and you will not be able to complete the remaining tutorial steps. Nowadays, almost all chipsets support this feature making this check a formality. Nevertheless, still verify to avoid frustration in the following steps.

  3. Disable bluetooth on the wireless card and ensure that either the Microsoft Virtual WiFi Miniport Adapter or the Microsoft Virtual Host Network Adapter is enabled. Goto Start Menu->Control Panel->System->Device Manager->Network adapters. Device Manager Network Adapters Note, that you will need to right click on the specific adapter to Enable or Disable the device. Some devices may also be hidden to reveal them select the View->Show hidden devices option from the menubar.

  4. Type netsh wlan set hostednetwork mode=allow ssid=homenetwork key=changeme KeyUsage=persistent to create the new hosted network. Set Hosted Network The mode option turns on the network card's hotspot feature while the ssid is the wireless networks broadcast name, key is the password which is set to "changeme" and KeyUsage allows the password to be persistent across sessions. For clarity the SSID can be named anything you like. Same goes for the password choice.

  5. Validate the configuration by displaying the previously created network profile. Type netsh wlan show hostednetwork. Show Hosted Network

  6. Start the virtual hotspot by typing netsh wlan start hostednetwork. Start hosted network

Troubleshooting Hosted Network Creation

A few users may get an error after step 4 like the following:

The hosted network couldn’t be started.
The group or resource is not in the correct state to perform the requested operation.

Usually this is caused by some conflict with the driver on Windows or having bluetooth enabled on the wireless network interface. Double check that all the devices in the note on Step 3 are in the correct state. Then retry step 4. Alternatively, you may need to update your wireless drivers.

Sharing the VPN over the homenetwork Hotspot.

  1. Open the "Network and Sharing Center." You can do this by right clicking the wireless icon in the taskbar Network and sharing center or from the control panel NSC from Control Panel

  2. Select "Change adapter settings" in the left pane. Change Adapter Settings

  3. Right Click the adapter that manages the VPN connection. Select the Properties option. Adapter Properties

  4. Go to the "Sharing" tab. Tick both checkboxes under the Internet Connection Sharing panel. In the drop down under Home networking connection: select the Hosted Virtual Network (This is the "homenetwork") that was created earlier.

Connect the Chromecast to the Hotspot

We are now at the stage final stage. By now you will see an additional network named "homenetwork" when you scan for wireless signals from the devices in the home. All that is needed now is to tell the Chromecast dongle to use this network instead of your regular home WiFi.

To do this simply rerun the setup by navigating to https://chromecast.com/setup.
Chromecast Setup

It is important to note here that you cannot run the setup from the laptop running the hotspot which hosts the "homenetwork" hosted virtual network. Reason being that during the initiation the Chromecast app will disconnect the WiFi on the laptop which will also drop the hotspot preventing the dongle form connecting and hence from completing the setup and registration.

Run the setup from your smartphone/tablet or another laptop instead. That's it! You can now cast away on VPN. Browse the tutorials for other similar articles.