Created
September 1, 2012 19:06
-
-
Save a-chernykh/3583565 to your computer and use it in GitHub Desktop.
Setup VPN server with WAN forwarding in 5 minutes
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
apt-get -y install pptpd dnsmasq | |
Add/uncomment the following line in /etc/sysctl.conf: | |
net.ipv4.ip_forward=1 | |
Commit the changes by running as root: | |
sysctl -p | |
Add the following line to /etc/rc.local. Also execute it as root: | |
/sbin/iptables --table nat --append POSTROUTING --out-interface eth0 --jump MASQUERADE | |
(optionally replace eth0 with your WAN interface) | |
Update /etc/pptpd.conf: | |
localip 192.168.10.1 | |
remoteip 192.168.10.100-200 | |
Update /etc/ppp/pptpd-options: | |
ms-dns 192.168.10.1 | |
Add your credentials to /etc/ppp/chap-secrets: | |
# client server secret IP addresses | |
username pptpd password * | |
Run /etc/init.d/pptpd restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment