How to install and configure pptpd in centos6

Source: Internet
Author: User

1. The software you need
Pppd PPP dialing Server
Pptpd supports pptpd Based on pppd dialing

2. Check whether your kernel supports MPPE.

Modprobe ppp-compress-18 & Echo OK
If OK is displayed, congratulations! Your kernel already has MPPE support. Go to Part 1

3. Upgrade the kernel to support MPPE


Dkms is a new software that allows you to plug in some kernel modules without compiling the kernel.
Kernel_ppp_mppe is the kernel module supported by MPPE.

Rpm-IVH dkms-
Rpm-IVH kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm

The preceding two methods are used to load the MPPE [Microsoft encryption protocol] For centos. encrypted connections cannot be used without installation.
Restart your system after OK

4. Install PPP

Yum install PPP
Rpm-uvh ppp-2.4.2-b3.i386.rpm

5. Install pptpd

(1) install with yum
# Vim/etc/yum. Repos. d/doylenet. Repo

Name = doylenet custom repository for centos
Base url =
Gpgcheck = 1
Gpgkey =
Enabled = 1

# Yum update
# Yum install pptpd

(2) download and install rpm

Rpm-IVH pptpd-1.1.3-4.i386.rpm
Pay attention to the 32-bit or 64-bit version, otherwise it will suffer a huge loss! I installed a 32-bit pptpd on a 64-bit server, and it took a long time to discover it !!!!

6. Configure your pppd and pptpd

Only a few items need to be configured in/etc/pptpd. conf.

Option/etc/PPP/options.ppt PD

# Logwtmp comment out logwtmp if a problem similar to the following occurs in the log !!!!

# Jun 21 15:39:55 center pppd [1374]:/usr/lib/pptpd/ wrong Elf class: elfclass32
# Jun 21 15:39:55 center pppd [1374]: Couldn't load plugin/usr/lib/pptpd/

Configure/etc/PPP/options.ppt PD
name pptpd
idle 2592000


Add a test user

# Secrets for authentication using chap
# Client server secret IP addresses
Test pptpd test *

The first test is the user, and the second test is the password. * indicates any IP address.


Configuration file/etc/sysctl. conf
# vim /etc/sysctl.conf
Modify the following content to enable IP forwarding:
net.ipv4.ip_forward = 1
Run the following command after saving and exiting:
sysctl -p


7. Open the firewall port


Open port 1723 and port 47 of the Linux server and enable the GRE protocol.

Iptables-A input-p tcp -- dport 1723-J accept
Iptables-A input-p tcp -- dport 47-J accept
Iptables-A input-P gre-J accept
Iptables-A postrouting-T nat-s eth0-J Masquerade
Iptables-A input-p udp -- dport 53-J accept, it took only half a day to find that the DNS port was not opened and almost fainted !!
Service iptables save

8. Test pptpd

If it is installed by default, you can set pptpd in any path.
If it succeeds, you will
Feb 10 09:51:46 kdfng pptpd [926]: Mgr: Manager process started

Feb 10 09:51:46 kdfng pptpd [926]: Mgr: maximum of 100 connections available



9. pptp vpn Client settings in win7

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: 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.