Configure pptpd as a VPN server on CentOS5VPS

Source: Internet
Author: User
Tags vps
A major purpose of VPS is to use it as an encrypted VPN server. connecting these VPN servers in China will allow unlimited access to the Internet. Common VPN servers are generally divided into two types, one is SSLVPN, which indicates that the software has openvpn, the VPN software has the client software under Windows, and the other is pptpdVPN, which comes with Windows VP.

A major purpose of VPS is to use it as an encrypted VPN server. connecting these VPN servers in China will allow unlimited access to the Internet. Common VPN servers are generally divided into two types: one is ssl vpn, which indicates that the software has openvpn, the VPN software has the client software under Windows, and the other is pptpd VPN, windows supports clients with such VPN. This document describes how to install the pptpd VPN server in CentOS 5 VPS.

The diahosting blog also provides a one-click installation package.

System requirements: CentOS 5 32 bits/64 bits.

Usage:

Wget http://www.diahosting.com/dload/pptpd.sh
Sh pptpd. sh

After the installation is complete, the vpn user name and password are displayed.

VPN user management:
Directly edit the/etc/ppp/chap-secrets file and add the user name and password in the same format.

Http://blog.diahosting.com/linux-tutorial/pptpd/

Kernel support
Pptpd VPN requires kernel support for mppe. Our VPS kernel has compiled mppe and does not use mppe as the kernel module.

Software Installation
To install pptpd VPN, the ppp and iptables software must be installed. the installation command is as follows:

Yum install-y ppp iptables and then download the pptpd rpm Package:

32 http://acelnmp.googlecode.com/files/pptpd-1.3.4-1.rhel5.1.i386.rpm
64-bit http://acelnmp.googlecode.com/files/pptpd-1.3.4-1.rhel5.1.x86_64.rpm

Note that 64-bit systems need to download 64-bit rpm packages, 32-bit systems need to download 32-bit rpm packages.

64-bit system installation command:

Rpm-ivh pptpd *. x86_64.rpm

32-bit system installation command:

Rpm-ivh pptpd *. i386.rpm: Edit the configuration file/etc/ppp/options.ppt pd as follows:

Name pptpd
Refuse-pap
Refuse-chap
Refuse-mschap
Require-mschap-v2
Require-mppe-128
Proxyarp
Lock
Nobsdcomp
Novj
Novjccomp
Nologfd
Ms-dns 208.67.222.222
Ms-dns 208.67.220.220 edit the configuration file/etc/pptpd. conf as follows:

Option/etc/ppp/options.ppt pd
Logwtmp
Localip 192.168.92.1
Remoteip 192.168.92.11-15 edit the configuration file/etc/ppp/chap-secrets. set the username to johndoe and password to password. the content is as follows:

Johndoe pptpd password * modify the corresponding content in the configuration file/etc/sysctl. conf as follows:

Net. ipv4.ip _ forward = 1 'configure iptables:

Iptables-t nat-a postrouting-o eth0-s 192.168.92.0/24-j MASQUERADE
Iptables-I forward-p tcp -- syn-I ppp +-j TCPMSS -- set-mss 1356
/Etc/init. d/iptables save
/Etc/init. d/iptables restart:

Chkconfig pptpd on
Chkconfig iptables on and run reboot to restart

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.