Configure pptpd as a VPN Server on CentOS5VPS

Source: Internet
Author: User
Srchttp: rashost. comblogcentos5-pptpd-vpn a major purpose of the united states VPS is as an encrypted VPN Server, in the domestic connection to these VPN servers can access the Internet without restrictions. Common VPN servers are generally divided into two types. One is SSLVPN, which indicates that the software has openvpn. The VPN software has client software under Windows. The other is

Src http://rashost.com/blog/centos5-pptpd-vpn.

A major purpose of us 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.

In addition, the diahosting blog provides the one-click installation package pptpd one key installer.

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

yum install -y ppp iptables

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 pptpdrefuse-paprefuse-chaprefuse-mschaprequire-mschap-v2require-mppe-128proxyarplocknobsdcompnovjnovjccompnologfdms-dns 208.67.222.222ms-dns 208.67.220.220

 

Edit the configuration file/etc/pptpd. conf as follows:

option /etc/ppp/options.pptpdlogwtmplocalip 192.168.92.1remoteip 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 configuration file/etc/sysctl. conf as follows:

net.ipv4.ip_forward = 1

&LsQuo; configure iptables:

iptables -t nat -A POSTROUTING -o eth0 -s 192.168.92.0/24 -j MASQUERADEiptables -I FORWARD -p tcp --syn -i ppp+ -j TCPMSS --set-mss 1356/etc/init.d/iptables save/etc/init.d/iptables restart

Set iptables and pptpd to automatically start upon startup:

chkconfig pptpd onchkconfig iptables on

Run reboot and 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.