Setup And Host My Own VPN

back to tech articles
What I used: Windows 7 Professional, TP-Link TL-R600VPN Router

This is pretty cool. VPNs have been around for aaaages, and there are tons of amazing uses for a VPN. Today I’m going to show you one scenario and what I did to take advantage of VPN technology to provide a solution. You will need a PPTP VPN-capable router for this setup.

The Scenario

My brother wants to access resources on my LAN, such as my media server, but he lives 30 miles away. We both have great broadband and he runs a Windows 7 PC (since neither of us can stand Windows 10). Enter the humble VPN. With this tech he can connect remotely to my network and be treated like just another machine on the Local Area Network – sweet!

The remote PC in this scenario is running Windows 7 Professional with Service Pack 1. Later on I will show you how to configure a VPN connection for that Operating System, but this can be modified for your own OS and version as applicable.

The Router

[amazon_link asins=’B006TTBYEM’ template=’ProductAd’ store=’twincr-21′ marketplace=’UK’ link_id=’97ef1a77-e69e-11e7-a0d6-d58b0944120e’]

To be completely honest, my own network is double-NAT’ed. That essentially means I have 2 routers; in my setup one router faces the internet and forwards all traffic to a second router, and that second router acts as the LAN gateway. It also serves DNS records for the LAN and is the DHCP server for the range 192.168.0.2192.168.0.200 (this range is important, I will explain why later on). I’ve omitted the first (WAN-facing) router in this guide since it is basically invisible and has no bearing on the setup as described here. FWIW that is a standard, unmodified Sky Router with WiFi disabled.

OK, onwards!

You will (obviously) need to have a VPN-capable router for this to work, since remote clients will be connecting to the router using that protocol. I’m using the brilliant little TP-Link TL-R600VPN. I know, I know, TP-Link is funded by the Chinese government and I’m supporting a suppressive regime by using one, etc. etc. They are great products, and inexpensive as well. Personally I’ve had a great experience with TP-Link products on the whole. This particular model supports several VPN modes. I will be using PPTP since it is easy to setup and maintain. Check out the wikipedia page for more information on PPTP.

Admittedly PPTP is rather old now, and this type of connection is not very secure, therefore I DO NOT recommend this for any scenario requiring a high level of security..

There, I said it; you have been warned.

Router Setup

1. Connect to your router’s admin interface using a web browser; it’s usually at 192.168.0.1. Login if necessary.

2. Navigate to the PPTP VPN Server page using the left-side navigation menu.

3. Enable both the PPTP Server and MPPE Encryption options.

4. Enter the IP range that the VPN server will use. This range must be within the address range of the LAN and also must not overlap the DHCP pool. For example, if the DHCP range runs from 192.168.0.2192.168.0.200 then your VPN server range must be outside that, as is the case in my example above. Adjust your settings as necessary.

Also your range should allow for several addresses, even if you intend to connect only 1 client. I’ve allowed for 20 IP addresses in my range (201 – 221). Next we need to add some accounts for users to connect with.

5. Save your settings.

6. Navigate to Account Settings, still under the PPTP VPN Server section.

From here we will add some accounts for users to connect with.

7. Click on the Add New… button and fill out the form.

The Account field is essentially the username.

8. Be sure to set the Status to Enabled and save the account info.

That’s the router setup completed. See, that wasn’t too difficult at all. Next we will move on – to the connection from the remote PC.

Remote PC Connection

Our VPN “server” is setup and waiting for connections. The next thing is to configure our client PC to connect to the server remotely.

In this setup I am using the basic Windows 7 theme. Your screen may differ slightly if you are setup to use the default “Aero” theme that ships with Windows 7 Pro. Despite the different appearance, the settings are identical.

1. Click on the Network icon on the Windows 7 taskbar (normally on the bottom right of your screen).

2. A small popup appears. Click on Open Network and Sharing Center.

3. Click on Set up a new connection or network.

4. Choose the option Connect to a workplace and click Next.

5. Choose the first option; Use my Internet Connection (VPN).

6. Next you will enter the VPN location address. Also we don’t want to connect now, so select that option. When you’re done, click Next.

In this example we will use the public IP of the remote network. If you want to get really fancy, you could setup a domain name to use here. Most Internet Service Providers will use dynamic IP addresses (as opposed to static IP addresses), in which case you will need to use a Dynamic DNS (DDNS) service if you want to have a domain name instead of an IP address. That is beyond the scope of this article though. For now we will use the WAN IP address of the remote network, which I’m pretending is 8.8.8.8. Name the connection anything you like.

Help, I don’t know the public IP address! From the target network (where the VPN server is listening), click this link.

7. Almost done. Next enter the account details you created earlier on the VPN server and click Create.

8. That’s the setup complete. Click Close since we want to tweak the properties before we connect to the VPN.

Connect to the VPN

Now that we have setup the connection, we just need to make some minor tweaks and we will be ready to connect.

1. On the Network and Sharing Center window, click on Change adapter settings.

2. Right-click on the VPN connection and select Properties.

3. Click on the Security tab and select PPTP from the Type of VPN drop-down list.

Depending on the VPN Router you are using, you may also have to check the option Unencrypted password (PAP).

4. Click OK to save the settings. Then right-click the connection again and click Connect.

5. We entered the account details earlier, so you should be ready to go. Click Connect.

After a short interval the VPN should connect. You will also see the connection listed on your connections popup when you click the network icon in the taskbar.

If you want to be connected to the VPN only then just disable the other connections in the Network Connections window.

 

Yay, you just setup your own VPN! The remote user can now connect to LAN resources as if they were sitting next to you.