In Centos 6, configure the pptpd service to set up a VPN because Google .com is frequently used to search for and watch Youtube videos. In addition, there are many friends on Facebook, therefore, I bought zen VPS in the United States to build the PPTP service for VPN.
The kernel in CentOS 6 release version already contains the MPPE module. You do not need to install and configure the dynamic kernel loading (dkms) and kernel_ppp_mppe modules. The specific configuration is as follows: Step 1. download pptpd http://poptop.sourceforge.net/yum/stable/rhel6Server/x86_64/ select a 32-bit or 64-bit rpm installation package as needed, or download the source code to compile the installation, the current version is 1.3.4-2 1 wget http://poptop.sourceforge.net/yum/stable/rhel6Server/x86_64/pptpd-1.3.4-2.el6.x86_64.rpm step 2. install the ppp Point-to-Point Protocol and install pptpd 1yum install-y ppp 2rpm-Uvh pptpd-1.3.4-2.el6.x86_64.rpm step 3. configure PPTPD 1 Vi/etc/ppp/options.ppt pd Add the following parameters to the end of the line to specify DNS2 3ms-dns 8.8.8.8 # specify as google DNS, you can also specify the DNS4ms-dns 8.8.4.41vi/etc/pptpd provided by the access provider where your server is located. add the following content to the end of the conf line to specify the IP address 2 3 localip 192.168.10.1 # specify the local IP address of the pptpd Server 4 remoteip 192.168.10.2-254 # specify the Dialing IP Address allocation range of the Remote vpn Client 5vi/etc/ppp/options.ppt pd adds the following parameters to the end of the line to specify DNS1vi/etc/ppp/chap-secrets add VPN username and password 2 3 # Secrets for authentication using CHAP4 # client server secret IP addresses5 vpnu Ser pptpd vpnpass * As shown above, the client specifies the user name, which is vpnuser. The server defines the service name. pptpd is used here. Secret specifies the user password, which is vpnpass. The following IP Address is a fixed IP Address assigned to this user. The IP Address must be within the range specified by remoteip in pptpd. conf. Multiple VPN users are assigned and configured by the branch. Step 4. configure port forwarding and firewall 1vi/etc/sysctl. conf change net. ipv4.ip _ forward parameter 0 is 1 enable forwarding 2 3 # Controls IP packet forwarding4net. ipv4.ip _ forward = 1 run sysctl-p to enable the firewall NAT forwarding configuration, as shown below: 1 iptables-a input-p TCP-I $ EXTIF -- dport 1723 -- sport 1024: 65534-j ACCEPT2iptables-t nat-a postrouting-o $ EXTIF-s 192.168.10.0/16-j MASQUERADE3iptables-I forward-p tcp -- syn-I ppp +-j TCPMSS -- set- step 5 of mss 1356. configure start 1 service iptables save # save firewall rule configuration 2 service iptables restart # restart firewall 3 service pptpd start # enable pptpd service note: VPN uses port 1723 by default, note that the firewall enables this port and then uses the windows client to directly establish a VPN dial-up connection.