Instructables

Setup a VPN for your iPhone/iPad or Computer

Picture of Setup a VPN for your iPhone/iPad or Computer
 The great thing about a netbook or an iPhone is that you can connect to the internet from anywhere, the bad thing is that most of this traffic is unencrypted. This unencrypted traffic is open to all the hackers, and all the web admins in the world. Luckily, there is a tool to counter this, every one of these devices can connect to a VPN, allowing encrypted traffic between your mobile device and your home network.
 
Remove these adsRemove these ads by Signing Up

Step 1: Installing and setting up PPTPD on Ubuntu Server

ssh into your server, and install the package pptpd on your ubuntu server or desktop

sudo apt-get install pptpd

Next it's time to configure your settings on your pptpd server with the file '''/etc/pptpd.conf'''

sudo nano /etc/pptpd.conf

Find the bottom lines that say

#localip 192.168.0.100
#remoteip 192.168.0.290

or something like that. We need to uncomment these lines, and change the ip addresses so they look something like this

localip local_ip_address_of_my_server
remoteip ip_range_to_assign_to_clients

The localip should be the address your router assigns to your server (make sure that your server receives a static ip), while the remoteip should be a range within your routers assignment range, but out of the normal assignment range

i.e. my local ip is 192.168.0.100 whereas my router assigns ip addresses between the ranges of 192.168.0.1-101, so i would set up my configuration like 

localip 192.168.0.100
remoteip 192.168.0.102-202


the remote ip is outside of my routers normal range, but still within the total range. 




Step 2: Find your DNS

 Now we need to find your DNS in order to enable internet traffic for your connected device. In order to find your DNS in ubuntu server, open the name server file.

sudo nano /etc/resolv.conf

You should see an ip address there, write it down. Now we need to let pptpd use that DNS. Edit the file pptpd-options

sudo nano /etc/ppp/pptpd-options

and find the lines

#ms-dns 10.0.0.1
#ms-dns 10.0.0.1

uncomment these lines, and replace the ip 10.0.0.1 with the ip address you wrote down earlier so it should look something like

ms-dns 192.168.0.1
ms-dns 192.168.0.1



spel3o3 years ago
Thank you so much! God, I think I was going to kill myself over all of the config files.. Plain clean and simple finally :)
afernie3 years ago
You need to forward tcp port 1723 for pptp from your router to your ubuntu server.
dtitzer4 years ago
Excellent write-up. I did this myself several months ago. I used no-ip.org to get DNS for my home ISP connection. Your write-up doesn't go into much detail on the external connection, but otherwise it's excellent. As advanced a topic as this, the reader should know about it.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!