Sharing your VPN connection

So you’ve set up your VPN on your PC and it’s great. But what about all your other stuff?

What if you’d like to run your network media player through it in order to be able to use the Netflix or Spotify apps? What about your mobiles, your consoles? Well, with a small amount of work, you can use your Windows PC to create a dedicated hotspot through which any device in your home can access your VPN connection.

It’s pretty simple, really: in Windows 7 and 8, you have the ability to create a virtual Wi-Fi hotspot. This turns your PC into a Wi-Fi access point to which other devices in your home can connect. Then you use Internet Connection Sharing to share the VPN connection so that devices connecting to the hotspot you created can use it to connect to the internet.

To do this, your PC will need wireless capabilities. If you’re using a desktop computer without wireless, you can use a USB Wi-Fi adapter. VPN sharing will only be active when the PC is switched on and connected to the VPN network.

Part 1: creating a virtual hotspot

Unfortunately, Windows does not provide a convenient graphical user interface for setting up a virtual hotspot. We actually have to use command prompt commands to get one up and running — which may please any DOS grognards among you, and possibly terrify any whippersnappers who never experienced the joys of the command prompt.

Instead of actually firing up CMD, however, we’re going to create a .bat file, which is a script of command prompt instructions that can be run just like an .exe file, just by clicking on it. We’re doing it this way because every time your computer reboots, Windows will stop the virtual hotspot and you have to restart it.

If you make a .bat file, however, you can just right click on the file and Run as administrator to reset the virtual hotspot. You can also put it in your Startup folder to run automatically when Windows starts.

Before we go ahead and create the .bat file, it’s important to know that you have to have administrator rights to create a virtual hotspot. You can right click on the on the .bat file and select Run as administrator.

So, to create the .bat file, just follow these few steps:

Step 1

NotepadOpen Notepad (or any other text file editor). You can use the Windows search function and just type notepad and press enter to find it quickly.

Step 2

Type the following lines into the text editor, replacing with the name you want your virtual hotspot to have (eg. VPN) and with the password you want to use:

netsh wlan set hostednetwork mode=allow
ssid= key= keyUsage=persistent
netsh wlan start hostednetwork

Step 3

Notepad2Click on ‘File > Save As’. Now this part is important: you need to change the default .txt extension to .bat. Change the Save as type to ‘All files’, then type in a filename with a .bat at the end of it.

Step 4

Networks1Run it. You can close Notepad now. Then go to wherever you saved the .bat file and right click on it and select Run as administrator. The command prompt will briefly pop up and then disappear.

Your PC will now be a virtual hotspot. You can check that it is by going to ‘Control Panel > Network and Internet > Network and Sharing Center > Change adapter settings’. Your list of network connections will include an extra one labelled with ‘Microsoft Virtual WiFi Miniport Adapter.’

Step 5

Connect to it with your other devices. The new wireless hotspot should appear in the list of available wireless networks on your mobile and other devices. Just connect to it using the password you entered into the text file. They won’t have internet access yet: that’s the next phase.

Part 2: Sharing

Now that you’ve got your virtual hotspot up and running, it’s time to share your VPN with the devices connect to it. This is super-easy.

Step 1

Go to ‘Control Panel > Network and Internet >Network and Sharing Center > Change adapter settings’ to see your list of current network devices. When you installed your VPN app, it will have created a new adapter for you — that’s your VPN connection. Now we just have to share it.

Step 2

Networks2Right click on the VPN adapter, then select Properties. Then click on the Sharing tab. Check the box to Allow other users to connect through this computer’s internet connection. Under Home networking connection: select the network device that corresponds to the virtual Wi-Fi device you’ve just created.

Most likely, it will be Wireless Network Connection 2. Then click OK. This turns on Internet Connection Sharing for the virtual Wi-Fi network.

Step 3

Surf away! Now any devices that connect to your new Wi-Fi hotspot will be routed through the VPN, giving them anonymity and a virtual location to access country-restricted services, just like on your PC.

You’re all done here.