VPS Linux Centos6.3 build a VPN (pptpd) Server 1. find the software package: Run wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.el6.x86_64.rpm in Centos System (it seems sourceforge.net this I can not open this campus network, or OpenShift to download) 2. check System Support and install the ppp and iptables package. The latter is usually installed by default. Use the local yum source yum install-y ppp iptables3. install the pptpd package. Needless to say, rpm-ivh can be rpm-ivh pptpd-1.3.4-2.el6.x86_64.rpm4. query where pptpd-related files are located [root @ localhost opt] # rpm-ql pptpd/etc/pp P/options.ppt pd/etc/pptpd. conf/etc/rc. d/init. d/pptpd/usr/bin/vpnstats. pl/usr/bin/vpnuser/usr/lib64/pptpd/pptpd-logwtmp.so/usr/sbin/bcrelay/usr/sbin/pptp-portslave/usr/sbin/pptpctrl/usr/sbin/ pptpd/usr/share/doc/pptpd-1.3.4/usr/share/doc/pptpd-1.3.4/AUTHORS/usr/share/doc/pptpd-1.3.4/COPYING/usr/share/doc/pptpd-1.3.4/ChangeLog/ usr/share/doc/pptpd-1.3.4/INSTALL/usr/share/doc/pptpd-1.3.4/README/usr/sha Re/doc/pptpd-1.3.4/README. bcrelay/usr/share/doc/pptpd-1.3.4/README. cvs/usr/share/doc/pptpd-1.3.4/README. inetd/usr/share/doc/pptpd-1.3.4/README. logwtmp/usr/share/doc/pptpd-1.3.4/README. portslave/usr/share/doc/pptpd-1.3.4/README. slirp/usr/share/doc/pptpd-1.3.4/TODO/usr/share/doc/pptpd-1.3.4/samples/usr/share/doc/pptpd-1.3.4/samples/chap-secrets/usr/share/ doc/pptpd-1.3.4/samples/options.ppt pd/usr/sha Re/doc/pptpd-1.3.4/samples/pptpd. conf/usr/share/man/man5/pptpd.conf.5.gz/usr/share/man/man8/pptpctrl.8.gz/usr/share/man/man8/pptpd.8.gz [root @ localhost opt] # The above something seems messy ~ Okay, let's just explain the configuration problem through cat. [Root @ localhost opt] # cat/etc/ppp/options.ppt pd | grep-v ^ $ | grep-v ^ # name pptpd // server name refuse-pap /// reject pap authentication refuse-chaprefuse-mschaprequire-mschap-v2require-mppe-128ms-dns 192.168.8.2 // configure the dnsms-dns 8.8.8.8proxyarplocknobsdcompnovjnovjccompnologfd [root @ localhost opt] # In fact, after the default installation, the file only needs to set the ms-dns address. [Root @ localhost opt] # cat/etc/pptpd. conf | grep-v ^ $ | grep-v ^ # option/etc/ppp/options.ppt pdlogwtmplocalip 192.168.22.22 // The local IP address of the vpn service remoteip 192.168.22.23-230 // assigned to the VPN the IP address range of the client [root @ localhost opt] # [root @ localhost opt] # cat/etc/ppp/chap-secrets # Secrets for authentication using CHAP # client server secret IP addressesKuTea. net pptpd 123321 * [root @ localhost opt] # This table will be filled in after you read it. The * number indicates that this is the reason. You can also limit the IP address range. The above is the configuration of PPTPD, and it will be available again. Simply put, the following is the configuration of the firewall. You only need to make a forwarding. Iptables-t nat-a postrouting-o eth0-s 192.168.22.0/24-j SNAT-to 192.168.9.133iptables-save, you can see that the above table is successful. You can establish a vpn connection.