Home > IT, Solved problems > How to set-up simple VPN connection between two remote computers. Step by Step using with pictures.

How to set-up simple VPN connection between two remote computers. Step by Step using with pictures.


Story:

My cousin lives in Germany and I want to access her PC via local IP address. My intention was to access her shared folders {read and write option which usually requires FTP server for remote pcs}. Another strong reason is to deploy local commands and no need of port forwarding in routers.

VPN {virtual private network} is secure tunnelling system that allows two computers to be connected locally over network. It is ideal to have higher upload rate which gives the real LAN feel. VPN also allows to setup manual IP as the local router would do, which is very handy to access remote computers.

clip_image001[14]clip_image001[15]Structure before VPN:

 

clip_image002[8]

 

To access her PC I need her WAN {public IP or router IP}. I could use Teamviewer to access her computer but I’m not Team-viewer fan. Personally I would prefer VNC as they are very thin applications and easy to handle. Team-viewer has master server in which all connections are passing those server and obviously every data you transfer and view is passing their master server.

VNC Preparation:

Before setting up VPN, some certain ports has to be freed in both server and client routers {if they are behind NAT or windows firewall}

Another important thing is to set-up static IP/ dynamic DNS. Most of our ISP provides us dynamic IP which changes every 24 hrs. This means our public IP or domain is changing every 24 hours. We can create an own static DNS using some application or even using our router application.

There are several providers who provide free dynamic DNS DYNDNS.org is well known provider and most of the router also includes this option to setup. In this tut we work with NO-IP.com

Setting up Dynamic DNS:

Idea is to get always the newest IP address of a machine through a domain name. It means every time when our router gets new IP we will forward this IP to a domain name. Which means whenever we ping the domain name we will get the latest public IP address of selected machine.

1. Go to http://www.no-ip.com

2. Create an account

3. Create host {it’s free} eg. Myrouter.no-ip.com

a. You don’t need any further settings when you create host. Just create one and leave all settings default.

4. On the same website download their application “DUC.Exe” Dynamic Update Client.

5. Install the software at SERVER PC {in this case my pc}

6. open the DUC application and login using your email address and no-ip.com password

a. {same login as you used with no-ip.com}

7. Select the hosts you want to update and check them

a. clip_image003[6]

Figure 1

8. Go to settings and make the application as system service

a. This allows running this application as a service which means when you start the pc it will start to run. Kind of auto run

Okay we have our Dynamic DNS now for the server and we will do some router settings for the server pc so clients can connect to our pc.

Router setting for Server PC:

Server computer {in this case my computer} should be able to access the port

1723 TCP

My computer has the IP: 192.168.1.20

My Default gateway: 192.168.1.1

My wireless router IP: 192.168.1.2

I have setup in my default gateway router {which has the NAT} that all connections from port 1723 should be forwarded to the IP: 192.168.1.20

Settings in Server computer {My PC}:

We want to allow the server pc to access incoming connections from the network. This let the client pc {my cousin’s PC} to connect to my pc and create local access network.

1. Go to “Control Panel\Network and Internet\Network Connections”

2. Press key combination [ALT]+F {You will see the file menu popup}

3. Select “New incoming connection”

clip_image005[6]

Figure 2

clip_image006[6]

Figure 3

4. Select the user you want to allow to connect remotely.

clip_image008[6]

Figure 4

5. Yes we want to allow the PC to be connected over the internet.

clip_image009[6]

Figure 5

6. Select the protocol you want to use. Mostly IPV4

clip_image010[6]

Figure 6

7. This is the server pc name {we don’t need this at this moment so you don’t have to print this out.}

clip_image012[6]

Figure 7

8. OPTIONAL: If you wish to specify clients IP range you can do it here. Otherwise server will automatically provide IP via DCHP server.

9. Check the box “allow calling computer to specify its own IP address”

a. {We can manually enter our wished IP in client pc’s}

10. Save everything and close it.

We have now a Dynamic DNS where our current public IP is updated. We have setup server now we go to client pc {in this case my cousin’s pc} and create the VPN connection.

Client settings:

clip_image014[6]

Figure 8

1. Go to control panel \network and internet\Network sharing centre

2. Click “Set up a new connection or network”

clip_image015[6]

Figure 9

3. Click “Connect to a workplace “VPN”

clip_image016[6]

Figure 10

4. Select “use my internet connection(VPN)

clip_image017[6]

Figure 11

5. Fill the settings

a. Internet address: It asks for the remote server address, you can type the IP address but we have setup an own dynamic DNS and we will use our DDNS. Enter the DDNS you have created previously for the server.

b. Destination Name : The VPN connection name {leave as it is}

c. Use smart card: smart cards for the connection {leave empty if u don’t have one}

d. Allow other people to use this connection….. : {This is internet sharing, we don’t want to share internet so we leave this empty }

e. Don’t connect now just set it up so I can connect later: {Check this as we don’t want to connect and we want to do some configuration}

6. Check the option “Don’t connect now……”

clip_image018[6]

Figure 12

7. Give user name and password {not your computer username and password. It asks for the server pc username and its password to connect to the server pc. We have done it previously see figure 3} domain is optional

clip_image019[6]

Figure 13

8. Just clos it we don’t want to connect now.

Now we want to setup the specified IP in client machine.{See picture below}

clip_image021[6]

Figure 14

1. Go to network connections

2. Change adapter settings

3. Click newly created VPN connection

4. Go to its property

5. Select tab “NETWORKING”

6. Select IPV4 protocol and press “properties”

7. Specify your own IP

8. Click “advanced”

9. Uncheck the option “use default gateway on remote network”

a. If you don’t uncheck this option your standard gateway will change into the servers IP Which means “After VPN YOU WILL NOT BE ABLE TO USE YOUR INTERNET”

b. Unchecking this option will keep your default gateway and your internet will work continuously

10. Save everything and close

Now we have setup almost everything if you connect the newly created VPN it should connect and you should be able to use your standard internet as well. In next chapter I will explain how to make use of VPN SmileSmileSmile

Questions and comments are welcome..

Technorati Tags: ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Windows Live Tags: connection,computers,Step,Story,cousin,Germany,intention,folders,option,server,Another,port,system,setup,Structure,Teamviewer,computer,Team,viewer,data,Preparation,ports,client,Most,domain,hours,providers,DYNDNS,provider,Dynamic,Idea,machine,Create,account,Myrouter,settings,Just,Update,Install,password,Select,Figure,auto,Okay,clients,Router,Default,gateway,Control,Panel,Network,Internet,Connections,combination,menu,user,protocol,moment,OPTIONAL,Otherwise,DCHP,Check,Save,Click,Connect,workplace,Fill,DDNS,Enter,Destination,Name,card,cards,configuration,Give,Change,adapter,properties,Specify,Uncheck,servers,ABLE,chapter,Questions,routers,login,username
WordPress Tags: connection,computers,Step,Story,cousin,Germany,intention,folders,option,server,Another,port,system,setup,Structure,Teamviewer,computer,Team,viewer,data,Preparation,ports,client,Most,domain,hours,providers,DYNDNS,provider,Dynamic,Idea,machine,Create,account,Myrouter,settings,Just,Update,Install,password,Select,Figure,auto,Okay,clients,Router,Default,gateway,Control,Panel,Network,Internet,Connections,combination,menu,user,protocol,moment,OPTIONAL,Otherwise,DCHP,Check,Save,Click,Connect,workplace,Fill,DDNS,Enter,Destination,Name,card,cards,configuration,Give,Change,adapter,properties,Specify,Uncheck,servers,ABLE,chapter,Questions,routers,login,username

Advertisements
  1. David
    July 15, 2011 at 3:30 am

    This is awesome, clear and straightforward! I will test it out soon. Thanks a lot for sharing!

    Like

  2. August 21, 2011 at 9:08 am

    thax too ; )))

    VPN is sick if you set up the connection to connect automatically to your server.. this means you have full access to her/his pc. I think don’t need to explain more what we can do with full access to pc :PPP

    my next chapter is to explain how to set up auto vpn connection and hack/ take full access but didn’t had time.. will try soon

    krish km

    Like

  3. November 7, 2012 at 12:07 pm

    hmmmm very nice sharing
    Realy appreciated mannnnn

    Like

  4. February 22, 2013 at 8:55 am

    Very nice post. I just stumbled upon your weblog and wanted to mention
    that I have really enjoyed surfing around your weblog posts.
    After all I’ll be subscribing to your feed and I hope you write once more soon!

    Like

  5. Max
    May 24, 2013 at 7:51 am

    Hi! where is the “next chapter” in which you will explain how to make use of VPN? 🙂 🙂
    great work!

    Like

  6. June 29, 2013 at 3:02 am

    Man..all i want to say is “i love u full….”
    I’ve create a software for micro finance company that belongs to my friend. And my friend want to know about the performance of the company via his smartphone (android). So i want create an android software to acces the database in the company’s server that i don’t know how to connect with (the company just using internet because vpn in my country (indonesia) is too expensive). thank’s to you, now i know how to do it…once again, thank a lot bro..

    Like

  7. July 17, 2013 at 4:30 pm

    Hello I am so excited I found your web site, I really found you by accident,
    while I was looking on Askjeeve for something else, Anyways I
    am here now and would just like to say cheers
    for a marvelous post and a all round entertaining blog (I also love the theme/design), I don’t have time to read through it all at the minute but I have bookmarked it and also added your RSS feeds, so when I have time I will be back to read a great deal more, Please do keep up the excellent work.

    Like

  8. September 14, 2013 at 7:00 pm

    Hi Can you please help me thanks. I own a domain http://www.tcorp.co.za & a dyndns domain tcorp.dyndns.biz. i can send and receive mail internally and externally successfully :). The problem i have a Dynamic Public IP causing my mail not to be (RECEIVED) if changed. im trying to get http://www.tcorp.co.za to relay mail to tcorp.dyndns.biz which then sends it to my server which i created the tcorp.co.za domain on. Please note my server has the AD & Exchange with DNS. http://www.tcorp.co.za is hosted with Afrihost.


    TCorp ©

    Saud Iqraam Kader
    Director
    website: http://www.bidorbuy.co.za/seller/1050691/Technology_Corporation
    email: web4usk@gmail.com
    cell: 0764724057

    Like

    • krish
      September 14, 2013 at 8:19 pm

      Hi saud,

      almost all hosting services give you option to switch from shared ip to static ip. Please give a try and contact your hosting helpline to check if its possible to get a static ip address for your domain. That would be an quick and easy solution for you.

      Having said that, I’m not quite sure I have properly understood your problem.

      Like

  9. satya
    September 3, 2014 at 4:22 am

    hi krish ,

    i have a problem over multiple vpns connected to my domain u plz try to resolve it

    i have 2 or more computers in my lan which they will access through vpn also to my network drive and i have recently configured another vpn to my branch where they will use the same domain name
    now the issue is that when i enable vpn over the internet to branch in firewall my local clients are unable to access the network drive .

    so p-lz try to understand the situation and suggest the solution so that both the people can access the vpns

    Like

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: