Wednesday, January 07, 2009

VPN connection from iPhone to Windows

After some fumbling around I finally figured out how to make a VPN connection from my iPhone to my Windows Vista PC.

To start out I used the guide "Setting up the Vista Point-to-Point Tunneling Protocol (PPTP) Virtual Private Network (VPN) Server". It is a great guide on how to set up a Windows to Windows PPTP VPN connection. The client side is not very well covered, but could easily be found elsewhere on the internet.

I had to set up port forwarding on both the ADSL modem as well as on my wireless router for port 1723. No other changes of settings were necessary on the routers.

After finishing the guide I could not get a VPN connection from either a windows client or from my iPhone. Some web guides have the advise to set the "account" on the iPhone with the syntax "Hostname\Username". This does not change anything. The trick to get a connection is to connect through a different subnet than the VPN server is connected to. This means connecting the iPhone via 3G or a different WiFi Network than the server is physically connected to. This makes sense since you do not need to go to the internet to make a VPN connection if you are allready connected locally.

Now I have a VPN connection from my iPhone to my Vista PC, but I still haven't figured out what I can use the connection to. The iPhone does not have any browser software to browse through local folders on the VPN server and when pinging the subnet I only get reply from the two local adresses for the VPN gateway and the incoming VPN client. I have tried making a port forward to a vnc server, but that didn't work out. I have thus so far not been able to do anything useful with the connection. If anyone have suggestions on how to make it useful, please publish a comment.