This article explains how you can connect to a PC over the internet using a VPN. I use this for work to allow me to connect to my work PC when I am away from the office, and it requires me to connect to our office VPN first. I won’t go into connecting to a VPN in this article, but may do up a VPN guide in the near future.

Once you are connected to your VPN, you will need to set up a way to connect to your machine. You have two options:
1) Remote Desktop – while this works just fine, I prefer the other option as I often only hibernate my machine, and if I log in via Remote Desktop, I’ll lose my current session.
2) VNC – this will connect to your current session, and whether you are logged in to your machine or not.

For both of these options, you need to know the local IP address of your machine. You should already have this information.

Remote Desktop Configuration

From the Start Menu, type “remote access” into the “Search programs and files” box.
Configure Remote Access

Under the Remote Desktop section, select the option to “Allow connections from computers running any version of Remote Desktop (less secure)”.

If your machine is set up to Hibernate, you will get a pop-up to notify you that you cannot connect if the machine is hibernated. This is not quite true, and I will explain that a little later.
Enable Remote Connections

Close the alert if you got one, and then click OK.

That’s all you need to do for Remote Desktop. Now, from outside of the local network, you can connect to your PC using a Remote Desktop connection using your local IP address.
Connect to machine via Remote Desktop

VNC Configuration

I prefer to connect via VNC, simply because it will connect to your machine in it’s current state. So if you are logged in with several programs running, you will see these programs exactly how you left them.

The best program I have used for a VNC connection is Tight-VNC. Download the “Self-installing package for Windows”.

The installation is fairly self-explanatory, and most options can be left at their default settings. See screenshots below if you are unsure.

Install both the Server and Viewer options. You will also need this on the machine you are using to connect to your remote PC.
Tight VNC Install

On the “Select Additional Tasks” window, select the option to “Set passwords before finishing the installation”. This saves you forgetting to do it later.
Tight VNC Install Options

Set your passwords. The first one is for when you attempt to connect to your machine, it will ask you to authenticate. The second one is to access the control interface for VNC on the machine. The second password is optional, but probably a good idea.
Tight VNC Install Options

Click install, and that’s it.

To connect using VNC, as for Remote Desktop, connect to the VPN, make sure the VNC program is installed then you can use the TightVNC Viewer to connect to your machine using it’s local IP address.
Connect to machine using Tight VNC

This is where it will ask for your password to connect to the VNC Server (the service you just installed).
Tight VNC Authentication

You will then see your login screen as if you were sitting in front of the machine. To send commands such as Ctrl-Alt-Del, there are some buttons at the top of the VNC Viewer window to send these commands to the remote machine.
Tight VNC Special Commands

Remote Turning on your PC

If your PC is switched off or hibernating, you need to power it up before you can connect to it. For this you will need to know the PCs MAC address to send it a Wake-On-Lan Packet (sometimes referred to as a Magic Packet) to wake up the machine.

You will need to download a tool to send the Magic Packet, and the easiest one I found is here. Download MC-WOL.EXE and save it somewhere on your machine (C:\ is an easy place to start). Open a command prompt at the location you saved MC-WOL.EXE, and run it giving the MAC address and IP address of your machine. Please note, you need to be connected to the VPN first before attempting this, else the command won’t get through. You need to pass the IP address so that you send the packet through the VPN.
e.g. MC-WOL MAC-address /a IP-address

I find the best way to check if the machine is awake is to ping the IP address. So once you’ve sent your WOL packet, enter ping IP-address /t (the /t will continue to send ping requests until you hit Ctrl-C). Once you start seeing replies, you can log in using your preferred option (from above).

Enjoy! As always, if you have any questions, please don’t hesitate to ask.