How to build a pptpd (VPN) service in CentOS 6.4

Source: Internet
Author: User
Tags require centos linux

Since Linux itself does not have integrated PPTP functionality, it is necessary to install the relevant components to allow our Redhat to support PPTP, according to the kernel version, download the appropriate installation package, the components used are as follows:

dkms-2.2.0.3-1.noarch.rpm

kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm

Pptpd-1.3.4.tar.gz

1.PPTP requires PPP support, although the system itself has PPP capabilities, but it does not support MPPE, so you need to update the system's PPP components,

[ROOT@HTUIDC local]# yum-y install gcc gcc-c++ rpm-build make wget automake

[ROOT@HTUIDC etc]# yum-y Install PPP

2. Install kernel MPPE (Microsoft Point to Point Encryption, Microsoft Point-to-Point Encryption) patch, install the following command:

[ROOT@HTUIDC etc]# RPM-IVH dkms-2.2.0.3-1.noarch.rpm

[ROOT@HTUIDC etc]# RPM-IVH kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm

Check that the kernel MPPE patch is successfully installed with the following command, MPPE module can include:

[ROOT@HTUIDC ~]# modprobe ppp-compress-18 && Echo Success

Success

[ROOT@HTUIDC etc]# CD/USR/LOCAL/SRC

[ROOT@HTUIDC src] #tar zxvf pptpd-1.3.4.tar.gz

[ROOT@HTUIDC src] #cd pptpd-1.3.4

[ROOT@HTUIDC pptpd-1.3.4]#./configure--prefix=/usr/local/pptpd

[ROOT@HTUIDC pptpd-1.3.4]# make && make install

After compiling the installation, you first need to manually build some directories and copy the original PPTPD configuration file:

[ROOT@HTUIDC pptpd-1.3.4]# Mkdir/usr/local/pptpd/etc

[ROOT@HTUIDC pptpd-1.3.4]# vi/usr/local/pptpd/etc/pptpd.conf

Fill in the contents as follows:

# pptpd.conf

Option/usr/local/pptpd/etc/options.pptpd

Debug

Stimeout 30

Localip 10.0.0.254

Remoteip 10.0.0.200-210

Description

OPTION/USR/LOCAL/PPTPD/ETC/OPTIONS.PPTPD ———— Specify the location of the PPTPD extended attribute profile options.pptpd.

Debug ———— Turn on debug mode, information and errors about PPTPD are recorded in the/var/logs/message for ease of error and debugging.

Stimeout ———— Set the maximum connection wait time (connection timeout) for the client to connect to PPTPD server, 30 seconds.

Localip 10.0.0.254 ———— pptpd server? The IP address of the server where you can set any IP address that is bound to the server.

Remoteip 10.0.0.200-210 ———— Set the range of IP addresses (10.0.0.200–10.0.0.210) that clients can allocate after they connect to PPTPD server, you can set this: 10.0.0.200-208,10.0.0. 209,10.0.0.210, the effect is the same.

[ROOT@HTUIDC pptpd-1.3.4]# VI/USR/LOCAL/PPTPD/ETC/OPTIONS.PPTPD

Fill in the contents as follows:

# OPTIONS.PPTPD

Name Htu-vpn

Refuse-pap

Refuse-chap

Refuse-mschap

Require-mschap-v2

require-mppe-128

Ms-dns 202.106.46.151

Ms-dns 202.106.0.20

# Ms-dns 208.67.222.222 Meter National Use

# Ms-dns 208.67.220.220

Proxyarp

Debug

Lock

Nobsdcomp

Novj

Novjccomp

Nologfd

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/

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.