How to: Windows 7 incoming VPN from Android

A couple of weeks ago I tried to get my HTC Incredible S, running Gingerbread to connect via VPN to my Windows 7 box.  I failed, but today I succeeded.  This is how.

I created the incoming VPN on Windows 7 by following instructions I found on the web:

Open the Network and Sharing Center

image

Click on Change Adapter Settings

image

Press Alt-F, and select New Incoming Connection

image

Configure the incoming connection

imageimageimage

Change the IPV4 properties to specify a DHCP range

Make sure the range you specify is on your LAN, and out of the range served by your DHCP server (you can updated your DHCP server to exclude this range).

image

Check the firewall

I went to Advanced Settings under Windows Firewall, clicked on Inbound Rules, clicked on the Local Port column to sort by that column, and then verified that the line for port 1723 was set up and enabled (Routing and Remote Access (PPTP-In).

image

Set up port forwarding

I then went to my Router configuration, and set up port forwarding, so that external connections to port 1723 were forwarded to the machine I just configured (which is always allocated the same IP address by the router):

image

Now my Android device can connect to my internal VPN using the default settings.  You’ll need to know your external IP address.  You can find it using tools like http://www.whatismyip.com/ but it may change.  I have mine set up using http://www.dyndns.com/

27 thoughts on “How to: Windows 7 incoming VPN from Android

  1. Dave R

    Wouldn’t it be simpler just to use a Remote Desktop client from your Android into your Win7 machine? That’s what I use on my Epic4G and it works pretty well; only problem is that it requires IP instead of machine name so I periodically have to look that up for it to work.

    Reply
  2. RichCK

    Great guide!

    Dave, connecting to one box via RDP is definitely not the same thing as accessing an entire network via VPN.

    Reply
  3. noah

    You can use a dynamic DNS service, such as dyndns.org, to automatically translate your changing public IP address to a hostname that stays the same (eg. samplename.dyndns.org). most routers have the ability to configure this service; just sign up for a free account, and enter the account info in the dynamic dns section of your router. Then you wont need to worry about checking to see if your ip address has changed.

    Reply
  4. noah

    sorry, i just realized that dyndns.org is mentioned at the bottom of the article. anyway check it out, it works.

    Reply
  5. rob

    This is absolutely fabulous! I’ve been searching for days trying to find out what VPN protocol to use (I didn’t know which one the Win7 built-in VPN server used), this made everything work.
    I have 3 PC’s at home, all of which have files that I like to be able to reach from the ‘Net and RDP is not a viable option. This way, I can get to my stuff at home with my phone if I need to.

    Reply
  6. Alex

    Set up the VPN, but cannot connect on my android device. Keeps giving me wrong username/password error. Ports are forwarded. :/

    Reply
  7. Pingback: How to setup VPN connection 'tween Win7 & Android? - Android Forums

  8. maciejos

    Hi,
    Rob….you have to do exacly like in this guide. There is a known error with PPTP on Android. I had the same issue. The problem was with IP range.
    Change the IPV4 properties to specify a DHCP range

    Make sure the range you specify is on your LAN, and out of the range served by your DHCP server (you can updated your DHCP server to exclude this range).

    Without this it would not work.

    Reply
  9. Javier DL

    Happy belated new year to all!
    How EXACTLY should I do to “Make sure the range I specify is on my LAN”?,
    I believe I know where to check the range served by my DHCP server though.

    Thanks in advance guys 🙂

    JDL

    Reply
  10. Graeme

    @Javier DL
    Control PanelNetwork and InternetNetwork Connections
    Double click on Incoming Connections Icon
    Networking Tab / Properties of IPV4
    If your router is say set to provide say 192.168.0.3 – 192.168.0.30, then you could enter 192.168.0.31 to 192.168.0.35 (or any range that does not overlap the router range and is a valid ip address.

    For others..
    If you are trying to connect to the VPN with a device already on the network via wifi try using your data connection instead.. I guess you would not be able to VPN onto a network that you are already on?

    Reply
  11. cisco kid

    Hi – Thanks for the info. My problem comes after the VPN connection has been establish. Do I need another application to view my shared files on my Windows 7 computer on my Android? If this is true can you suggest one from the Google On Line Software Library

    Reply
  12. Pingback: Problema configurazione VPN - Samsung Galaxy Nexus - Forum Android Italia - AndroidWorld.it

  13. Shrey Marwah

    I was able to setup the incoming connection on my windows 7 computer, now i have an android device, i started setting up the VPN, first it asked for the name so i entered a name of my choice, then it asked for a server address so i entered the Local IP Address of my computer, then it asked for username and a password but i am wondering where i can find it. And yes I had setup the port forwarding for VPN-PPTP on the router as per the guide above. Someone please help!

    Reply
  14. Martin K.

    I tried this once before and beat my head against the wall trying to get it working. I followed this article to the letter and got it working on the first try!

    Reply
  15. Arend

    From the Netherlands.

    I was searching too the whole weekend.
    Thanks for the comments on this page.
    It is working..

    But i always wanna know, how does it works? I mean, whats happening when i make a connection?

    Thanks. Arend

    Reply
  16. Pingback: Need help accessing a windows 7 machine that is hosting a vpn

  17. Sven Bufferino

    Thanks, this is the only guide that mentions the known error with PPTP on Android, which is mother-effing critical in the setup.

    Reply
  18. Luuk

    @Shrey Marwah

    You need to do the following:
    1) forward port 1723
    2) go to configurationpanel -> windows firewall -> advanced. On the left, click incoming connections. Search for the “local port” tab and find port 1723. Check is this one is active.
    3) set a accountname and password at your PC. Go to account settings for this. If you try the following credentials;
    name: Shrey
    password: 1234 (change it later on for a safer one!)
    you should also use these with the VPN. Furthermore, use whatismyip.com to find your computer

    4) use cmd -> ipconfig to see what you local ip is (192.168.0.104 for example).
    5) Change the IPV4 properties to specify a DHCP range, make sure the above ip adres within this range!
    6) find your IP address at http://whatismyipaddress.com/
    6) On android device, go to VPN, name it “Shrey”, use the ipaddress found at whatismyipaddress.com and NOT the local ipaddress. Click ok. If you now connect tot the VPN, use the PC login credentials and it should be fine!

    Reply
  19. Jose

    Hello,

    I appreciate the guidance given here. I am looking forward to set up my own VPN, but unfortunately I am not able to connect.
    I have followed all the steps, I think, such as: hi

    1.I open port 1723 for the computer (windows 7) I want to connect to.
    2. I have enabled such port in Firewall settings.
    3. I have set up a new user account with its own password and username. When I create a VPN profile, in my Android tablet, I try to connect with such credentials.
    4. On setting the VPN profile I also include the public Ip of the computer I want to connect to.
    5. For the IPV4 properties I specified a dhcp range including the IP of the computer I want to connect to (from what some people say above it is not very clear if I need to include it or exclude it).
    I have tried setting different user accounts and all of them I have them activated as incoming connexion profiles.
    Please, what is failing here?
    Maybe just that the IP of the computer I want to connect to shouldn’t be included in the dhcp range??
    I would appreciate any hint.

    BTW, I tried too, at first, to connect from the tablet when it is part of the same home network. I suppose this is not possible as someone said above.
    Are there any other ways to remote control the computer when this is the case? Data connection as suggested above? How would this be set up please?
    Thank you a million in advance!

    Reply
  20. 9-texts.com

    You will see a confirmation message that the incoming VPN connection has been created, with the name of the computer name the remote user will need.

    Reply
  21. spanibang.com

    In the “Change Adapter Settings” windows, you will see adapters showing wireless connections you’ve already configured on the computer, VPN connections, and the regular network adapter that is installed on the computer.

    Reply

Leave a Reply to Dave R Cancel reply

Your email address will not be published. Required fields are marked *