Configure pptpd service in Centos6 to build a VPN

Source: Internet
Author: User
In Centos6, 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 zenVPS in the United States to build the PPTP service for VPN. The kernel in CentOS6 has included MP... 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 the 32-bit or 64-bit rpm installation package as needed, or download the source code for compilation and 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 1vi/etc/ppp/options.ppt pd and add the following parameters at the end of the line to specify DNS2 3ms-dns 8.8.8.8 # 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 at the end Add the following parameters to specify DNS1vi/etc/ppp/chap-secrets add VPN username and password 2 3 # Secrets for authentication using CHAP4 # client server secret IP addresses5 vpnuser pptpd vpnpass * as shown above, the user name specified by the client. vpnuser is used here. 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.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.