Created
June 26, 2014 10:56
-
-
Save SVilgelm/e0ed06dd1bb4c83baa83 to your computer and use it in GitHub Desktop.
PPTP VPN on Ubuntu 12.04 Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is a quick tutorial to set up a basic PPTP VPN server on Ubuntu 12.04. | |
Install Necessary Packages | |
$ aptitude install ppp pptpd | |
Configure DNS Servers to Use When Clients Connect to this PPTP Server | |
$ nano /etc/ppp/pptpd-options | |
Modify OR Add the following lines in end | |
ms-dns 8.8.8.8 | |
ms-dns 8.8.4.4 | |
Create a PPTP User | |
$ nano /etc/ppp/chap-secrets | |
Append a line at the bottom so your file looks something like: | |
# client server secret IP addresses | |
test pptpd abcd1234 * | |
Configure NAT for PPTP Connections | |
Without this step you will be able to connect but your connection will not be able to load any web connection from this server. | |
$ nano /etc/rc.local | |
Add the following to the bottom right before “exit 0” line: | |
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
Assuming eth0, you can use ifconfig to check network name. | |
Enable IPv4 forwading: | |
$ nano /etc/sysctl.conf | |
Uncomment the following line: | |
net.ipv4.ip_forward=1 | |
Then reload the configuration: | |
$ sysctl -p | |
Restart your pptpd server | |
$ service pptpd restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment