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
Wget http://poptop.sourceforge.net/yum/stable/packages/dkms-2.0.17.5-1.noarch.rpm
Wget http://poptop.sourceforge.net/yum/stable/packages/kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm
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-2.0.17.5-1.noarch.rpm
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
Or
Rpm-uvh ppp-2.4.2-b3.i386.rpm
5. Install pptpd
(1) install with yum
# Vim/etc/yum. Repos. d/doylenet. Repo
[Doylenet]
Name = doylenet custom repository for centos
Base url = http://files.doylenet.net/linux/yum/centos/5/i386/doylenet/
Gpgcheck = 1
Gpgkey = http://files.doylenet.net/linux/yum/centos/RPM-GPG-KEY-rdoyle
Enabled = 1
# Yum update
# Yum install pptpd
(2) download and install rpm
Wget ftp://ftp.ntua.gr/pub/net/poptop/pptpd/pptpd-1.3.1/pptpd-1.1.3-4.i386.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/pptpd-logwtmp.so: wrong Elf class: elfclass32
# Jun 21 15:39:55 center pppd [1374]: Couldn't load plugin/usr/lib/pptpd/pptpd-logwtmp.so
Localip 192.168.9.1
Remoteip 192.168.9.11-30
Configure/etc/PPP/options.ppt PD
name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
lock
nobsdcomp
novj
novjccomp
nologfd
idle 2592000
ms-dns 8.8.8.8
ms-dns 8.8.4.4
Edit/etc/PPP/chap-secrets
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 192.168.9.0/24-O 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
/Var/log/messages
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