Skip to content

Instantly share code, notes, and snippets.

@bitkevin
Last active December 21, 2015 15:38
Show Gist options
  • Save bitkevin/6327608 to your computer and use it in GitHub Desktop.
Save bitkevin/6327608 to your computer and use it in GitHub Desktop.

=== install pptpd ===

$ yum install -y ppp libpcap
$ wget "https://lnmpp.googlecode.com/files/pptpd-1.3.4-2.el6.x86_64.rpm"
$ rpm -ivh ptpd-1.3.4-2.el6.x86_64.rpm

=== vim /etc/sysctl.conf ===

net.ipv4.ip_forward = 1

=== sysctl ===

$ sysctl -p

=== vim /etc/pptpd.conf ===

# add 
localip 192.168.240.1
remoteip 192.168.240.101-200

=== vim /etc/ppp/options.pptpd ===

# add
ms-dns 114.114.114.114
ms-dns 8.8.8.8
ms-dns 8.8.4.4

=== vim /etc/sysconfig/iptables ===

-A INPUT -p tcp -m tcp --dport 1723 -j ACCEPT
-A POSTROUTING -s 192.168.240.0/24 -o eth0 -j MASQUERADE
-A INPUT -p gre -j ACCEPT

=== vim /etc/ppp/chap-secrets ===

# add account 
<username> pptpd <password> *

=== start ===

/etc/init.d/pptpd start
chkconfig pptpd on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment