Have you ever wanted to access network resources on your home network with your iPhone/iPod? I am going to show you how to setup a simple PPTP VPN tunnel on your Windows 7 machine and then connect to it using your iPhone or iPod.
First, we need to setup the VPN server. On your Windows 7 machine, go into your Control Panel and then open up Network and Sharing Center. Now click on Change adapter settings.
Now if your Menu is not visible like below, click Alt and your menu should appear. Click on File...New Incoming Connection...
Now you'll be given a list of users that are on your Windows 7 machine. Choose the user that you will use to login to the VPN connection. I'll be using mick for this example.
On the next page, ensure that Through the Internet is checked.
On the next page, check all the boxes as seen below.
Click on Allow Access. Your Windows 7 machine should now be listening for VPN connections on port 1723. We can check that by opening up the Command Prompt and typing in netstat -a
So our VPN server is now listening for connections. We are not done yet, on your router you will need to forward port 1723 to the IP address of the machine you just set this connection up on. To get your IP address on your Windows 7 machine, open up the Command Prompt and type in ipconfig /all. Take note of the following options:
We are now going to set your computer up with a Static IP Address if you have not already done so.
Like before, go into the Control Panel and click on Network and Sharing Center. Then, click on Change Adapter Settings. Right click on Local Area Connection and choose Properties. Now select Internet Protocol Version 4 (TCP/IPv4) and click on Properties.
Enter in the information you took note of when using ipconfig /all.
Click Ok and open up the command prompt to make sure you can still access the internet. Type in ping google.com You should see a message that looks similar to the image below.
Now that we have a static IP address set up, we can set up Port Forwarding on the router. I am using a Linksys WRT54G router for this example.
Log into your router and find the Port Forwarding option menu. Your menu may look a little different then the one I am using but it is still the same principal. We want to forward all requests for port 1723 to the Windows 7 machine we set up the VPN connection on. Use the static IP address that you assigned your computer.
Now to connect to our VPN server, we need to know our public IP address. You can find that out by going to whatismy.com, ipchicken.com or just using google. Since your public IP Address is probably dynamic (meaning that it may change on occasion) I would suggest setting up your computer with a DynDns account. This site allows you to assign a DNS name (e.g. yourname.dyndns.org) for free and when your public IP Address changes, the software updates your DNS name with the new IP address.
Now that we have our port forwarding setup, let's set up our devices to connect to our new VPN tunnel.
Click on Settings
Click on General
Click on Network
Scroll down and click on VPN
Click on Add VPN Configuration...
Fill in the fields with your information. Ensure that PPTP is selected and Send All Traffic is off.
After you have entered all of your information, click on Save. Then try out the VPN connection, your screen should look like this if everything was setup properly.