forked from flyher/shumeipai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Raspberry Pi VPN Server.html
73 lines (73 loc) · 40.5 KB
/
Raspberry Pi VPN Server.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta name="exporter-version" content=mNote Mac 2.4.10"/><meta name="created" content="2013-07-29T14:36:49Z"/><meta name="updated" content="2013-07-29T14:36:49Z"/><title>Raspberry Pi VPN Server</title></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><div style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 4571px; padding: 0px; text-decoration: initial; width: 544px;">
<p style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 264px; margin: 0px 0px 24px; padding: 0px; text-decoration: initial; width: 544px;">You have a raspberry pi— a low-power always-on computer. Why not use it as a VPN server for tunneling your internet through when travelling? This could, for example, help you ensure a secure browsing experience when you’re on a sketchy public wifi network. Or perhaps you’re considering moving to another country for a couple months. Just find a friend or family member who is willing to let you mooch off their internet from time to time, and plug your Raspberry Pi into their network while you’re away. This will give you an American IP address for utilizing all those US only services while you’re abroad. There aren’t many helpful step-by-step guides to setting up a VPN server on your raspberry pi, so that’s what I seek to provide here.
<br><br><strong style="display: inline; font-style: normal; font-variant: normal; font-weight: bold; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; padding: 0px; text-decoration: initial;">Contents</strong>
</p><ul style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 120px; margin: 16px 0px 16px 24px; padding: 0px; text-decoration: initial; width: 520px; list-style: disc inside none;"><li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;"><a href="http://wellsb.com/post/29412820494/raspberry-pi-vpn-server#server" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-align: left; text-decoration: underline;">VPN Server Setup (Raspberry Pi)</a></li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;"><a href="http://wellsb.com/post/29412820494/raspberry-pi-vpn-server#router" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-align: left; text-decoration: underline;">Router Setup</a></li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;"><a href="http://wellsb.com/post/29412820494/raspberry-pi-vpn-server#dyndns" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-align: left; text-decoration: underline;">Dynamic DNS (Raspberry Pi)</a></li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;"><a href="http://wellsb.com/post/29412820494/raspberry-pi-vpn-server#win7client" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-align: left; text-decoration: underline;">Windows 7 Client Setup</a></li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;"><a href="http://wellsb.com/post/29412820494/raspberry-pi-vpn-server#androidclient" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-align: left; text-decoration: underline;">Android Client Setup</a></li></ul><br><div style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-decoration: initial; width: 544px;"><strong style="display: inline; font-style: normal; font-variant: normal; font-weight: bold; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; padding: 0px; text-decoration: initial;">VPN Server Setup (Raspberry Pi)</strong></div>
First, you’ll need a kernel with MPPE support. I have tested this guide with <a href="http://learn.adafruit.com/adafruit-raspberry-pi-educational-linux-distro/occidentalis-v0-dot-1" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-decoration: underline;">Occidentalis v0.1</a> by Adafruit and with <a href="http://www.raspbmc.com/download/" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-decoration: underline;">Raspbmc RC4</a>. To test if the kernel on your distro of choice has MPPE support, type <pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 19px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">sudo modprobe ppp-compress-18</pre>If this works without any errors, your kernel should do the job. By the way, you can do all this through SSH (or through VNC) or directly on your Pi with a keyboard and mouse.
<br><!-- more --><br>
Next, install the PPTP server package. I’m using a debian based distro, so I execute the following command: <pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 19px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">sudo apt-get install pptpd</pre>
<br>
Next, edit ‘/etc/pptpd.conf’ If you have started an X session, you can use a graphical text editor. Otherwise, you can use VI. Since this is a beginner’s tutorial, I won’t explain how to use VI. If you are using LXDE, open a <strong style="display: inline; font-style: normal; font-variant: normal; font-weight: bold; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; padding: 0px; text-decoration: initial;">root</strong> terminal and type <pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 19px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">leafpad /etc/pptpd.conf</pre>
If you prefer working in the terminal use the following. This is what I will use for the remainder of the tutorial, but you can use whatever text editor you like. <pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 19px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">sudo vi /etc/pptpd.conf</pre>At the end of the file, add (or uncomment if it already exists) the following lines <pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 38px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">localip 192.168.0.1<br>remoteip 192.168.1.234-238,192.168.1.245</pre>Be sure to replace this information with what you actually need. LocalIP is the internal IP of your raspberry pi, and the Remote IP range are the addresses that will be handed out to clients.
<br><br>
Now, edit the ‘/etc/ppp/pptpd-options’ file. <pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 19px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">sudo vi /etc/ppp/pptpd-options</pre>Append the following directives to the end of the file: <pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 95px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">ms-dns 192.168.1.1<br>nobsdcomp<br>noipx<br>mtu 1490<br>mru 1490</pre>Where the IP used for the ms-dns directive is the DNS server for the local network to which your client will be connecting (quite possibly the IP address of your router).
<br><br>
Next, edit the ‘/etc/ppp/chap-secrets’ files. This is where you will place your credentials for logging into the VPN server. <pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 19px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">sudo vi /etc/ppp/chap-secrets</pre>Add your authentication credentials in the following form:<pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 19px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">username[TAB]*[TAB]password[TAB]*</pre>You should probably use a very strong password for authentication.<br><br>
Restart the PPTP daemon by executing the following command: <pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 19px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">sudo service pptpd restart</pre>
<br>
Now, enable forwarding if you wish to have access to your entire home network while away. Edit the ‘sysctl’ file. <pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 19px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">sudo vi /etc/sysctl.conf</pre>Find “net.ipv4.ip_forward=1” and uncomment it (or change =0 to =1) to enable forwarding. Now, execute the following command to apply changes: <pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 19px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">sudo sysctl -p</pre>
<br>
We’re all set on the server side. Everything should persist upon restart, so no worries there. Now, let’s configure our router.<br><br><div style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-decoration: initial; width: 544px;"><strong style="display: inline; font-style: normal; font-variant: normal; font-weight: bold; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; padding: 0px; text-decoration: initial;">Router Setup</strong></div>
We must forward TCP port 1723 on the router to the IP Address of the Raspberry Pi. You can visit <a href="http://portforward.com/routers.htm" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-decoration: underline;">Port Forward</a> for step-by-step instructions for setting this up with your particular router. While you’re at it, you may want to set up a static IP address for your Raspberry Pi’s MAC address in your router’s DHCP configuration settings. This way, your local IP address (the one to which you’re forwarding the port) doesn’t change.
<br><br><div style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-decoration: initial; width: 544px;"><strong style="display: inline; font-style: normal; font-variant: normal; font-weight: bold; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; padding: 0px; text-decoration: initial;">Dynamic DNS (Raspberry Pi)</strong></div>
You may be wondering how you’re going to connect to this thing? Your public IP address is probably not static. We’ll set up dynamic DNS on our Pi, so we can refer to our VPN server by hostname. First, go to <a href="http://www.dnsdynamic.org/" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-decoration: underline;">dnsdynamic.org</a> and register. Validate your email address, and add a domain. Go ahead and save the new domain with the IP address that appears by default. This tutorial will use ‘[domain].dnsdynamic.com’ so when you see this notation, just replace it with the domain you’ve selected.
<br><br>
Now, we’re back on our raspberry pi. Open a root terminal and type <pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 19px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">sudo apt-get install ddclient</pre>An installation dialogue should appear.
<ul style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 240px; margin: 16px 0px 16px 24px; padding: 0px; text-decoration: initial; width: 520px; list-style: disc inside none;"><li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">When asked to select a Dynamic DNS service provider, choose “Other.”</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 48px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">It should ask for the name of the service provider. Enter “www.dnsdynamic.org”</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">On the next screen, select the “dyndns2” protocol.</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 48px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Now, enter the username (email address) and password you used when you registered at <a href="http://www.dnsdynamic.org/" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-align: left; text-decoration: underline;">dnsdynamic.org</a></li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 72px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">It, now, asks which network interface to use. If you are using the ethernet port on your Pi, enter “eth0”. If you have setup a usb wifi interface adapter, you may enter “wlan0”</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Next, enter the domain you registered: “[domain].dnsdynamic.com”</li></ul><br>
Now, wait for the installation to complete. If you’re behind a router, ddclient will incorrectly associate your internal IP address with your dynamic DNS domain. You can verify this by going to <a href="http://www.dnsdynamic.org/" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-decoration: underline;">dnsdynamic.org</a>, log in, click manage, and edit your existing domain. Let’s fix that.<br>
Edit ‘ddclient.conf’ <pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 19px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">sudo vi /etc/ddclient.conf</pre>
<ul style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 72px; margin: 16px 0px 16px 24px; padding: 0px; text-decoration: initial; width: 520px; list-style: disc inside none;"><li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Find the line “use=if, if=eth0” and comment it (add a # in front).</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Add the line “use=web, web=checkip.dyndns.org”</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Save and quit</li></ul><br>
Restart ddclient <pre style="background-image: none; background-attachment: scroll; background-origin: padding-box; background-clip: border-box; background-color: rgb(255, 255, 224); background-size: auto; border: 1px inset rgb(255, 165, 0); display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 13px; line-height: 19px; font-family: monospace; height: 19px; margin: 13px 6.5px 13px 19.5px; overflow: auto; padding: 4px; text-align: left; text-decoration: initial; white-space: pre; width: 508px; background-position: 0% 0%; background-repeat: repeat repeat;">sudo service ddclient restart</pre>
Now, when you go to <a href="http://www.dnsdynamic.org/" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-decoration: underline;">dnsdynamic.org</a> and go to manage and edit your existing domain, you should see your public IP address, now.<br><br>
We’re all finished on the server side. Now, let’s configure our clients.
<br><br><div style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-decoration: initial; width: 544px;"><strong style="display: inline; font-style: normal; font-variant: normal; font-weight: bold; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; padding: 0px; text-decoration: initial;">Windows 7 Client Setup</strong></div>
<ul style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 528px; margin: 16px 0px 16px 24px; padding: 0px; text-decoration: initial; width: 520px; list-style: disc inside none;"><li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">In the Network and Sharing Center, set up a new connection.</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Connect to workplace</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Use my Internet Connection (VPN)</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Internet Address: “[domain].dnsdynamic.com”</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 48px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Destionation Name: “Raspberry Pi” (or whatever you want to call your VPN server)</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Enter Username and Password (from chap-secrets file on raspberry pi!)</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">If the connection fails, set up this connection anyway and proceed to next step</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Back in Network and Sharing Center, click Change Adapter Settings</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Find connection we just created, right click, Properties</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Security tab: Set type to “PPTP”</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Advanced tab: Click IP4V, Click Properties</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">In the new window, click Advanced</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 192px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Here you have two options:
<ul style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 168px; margin: 0px 0px 0px 24px; padding: 0px; text-align: left; text-decoration: initial; width: 496px; list-style: circle inside none;"><li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 96px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 496px; list-style: circle inside none;">If you wish to access resources or services on your home network, but wish to connect to the internet on your existing connection, then uncheck “Use default gateway on remote network.” This will establish a split-tunnel connection.</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 72px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 496px; list-style: circle inside none;">If you wish to pass all traffic through the VPN, leave the box checked. Your browsing may be slower, but your traffic will appear from your home IP address.</li></ul></li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Ok. You should now be able to connect</li></ul><br><div style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-decoration: initial; width: 544px;"><strong style="display: inline; font-style: normal; font-variant: normal; font-weight: bold; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; padding: 0px; text-decoration: initial;">Android Client Setup</strong></div>
Your instructions may differ slightly depending on android version.<br><ul style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 216px; margin: 16px 0px 16px 24px; padding: 0px; text-decoration: initial; width: 520px; list-style: disc inside none;"><li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Go to Settings</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Under Wireless & Networks, select More…</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Select VPN</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Name: “Raspberry Pi” (or whatever you want to call your VPN server)</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Type: PPTP</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Server Address: “[domain].dnsdynamic.com”</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Select Connection you just created</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">Enter Username and Password (from chap-secrets file on server!)</li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;">You should now be connected to your VPN server.</li></ul><br><strong style="display: inline; font-style: normal; font-variant: normal; font-weight: bold; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; padding: 0px; text-decoration: initial;">Conclusion</strong><br>
That’s it! You’re all set with a VPN server on your Raspberry Pi. Keep in mind, PPTP is inherently less secure than an OpenVPN protocol solution. However, it’s much easier to set up on a Raspberry Pi :)<br>
Sources:
<ul style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 72px; margin: 16px 0px 16px 24px; padding: 0px; text-decoration: initial; width: 520px; list-style: disc inside none;"><li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 24px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;"><a href="http://www.howtogeek.com/51237/setting-up-a-vpn-pptp-server-on-debian/" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-align: left; text-decoration: underline;"></a><a href="http://www.howtogeek.com/51237/setting-up-a-vpn-pptp-server-on-debian/" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-align: left; text-decoration: underline;">http://www.howtogeek.com/51237/setting-up-a-vpn-pptp-server-on-debian/</a></li>
<li style="display: list-item; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 48px; margin: 0px; padding: 0px; text-align: left; text-decoration: initial; width: 520px; list-style: disc inside none;"><a href="http://raspberrypipod.blogspot.co.uk/2012/07/dynamic-dns-open-up-your-pis-webserver.html" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-align: left; text-decoration: underline;"></a><a href="http://raspberrypipod.blogspot.co.uk/2012/07/dynamic-dns-open-up-your-pis-webserver.html" style="border: 0px none rgb(110, 154, 39); color: rgb(110, 154, 39); display: inline; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; margin: 0px; outline: rgb(110, 154, 39) none 0px; padding: 0px; text-align: left; text-decoration: underline;">http://raspberrypipod.blogspot.co.uk/2012/07/dynamic-dns-open-up-your-pis-webserver.html</a></li></ul><p style="display: block; font-style: normal; font-variant: normal; font-weight: normal; font-size: 16px; line-height: 24px; font-family: Georgia, serif; height: 0px; margin: 0px 0px 24px; padding: 0px; text-decoration: initial; width: 544px;"></p>
</div></div></body></html>