CentOS Install PPTP VPN configuration details

Source: Internet
Author: User
Tags require iptables

CentOS PPTP VPN Server (32-bit) installation

1. Package Installation

The code is as follows Copy Code
Yum install-y PPP Iptables
wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.el6.i686.rpm
RPM-IVH pptpd-1.3.4-2.el6.i686.rpm

2. Configuration file
2.1 Configuration/ETC/PPP/OPTIONS.PPTPD

The code is as follows Copy Code
Mv/etc/ppp/options.pptpd/etc/ppp/options.pptpd.bak
Vi/etc/ppp/options.pptpd

Enter the following content:

The code is as follows Copy Code
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

2.2 Configuration file/etc/ppp/chap-secrets

The code is as follows Copy Code
Mv/etc/ppp/chap-secrets/etc/ppp/chap-secrets.bak
Vi/etc/ppp/chap-secrets

Enter the following content

The code is as follows Copy Code
#client Server Secret IP addresses
Sjolzy pptpd Password *

Note: The login username and password for the PPTP VPN are Sjolzy and password respectively

2.3 Configuration file/etc/pptpd.conf

The code is as follows Copy Code
Mv/etc/pptpd.conf/etc/pptpd.conf.bak
Vi/etc/pptpd.conf

Enter the following content:

The code is as follows Copy Code
Option/etc/ppp/options.pptpd
Logwtmp
Localip 192.168.9.1
Remoteip 192.168.9.11-30

Note: Dynamically allocating IP between 192.168.9.11~192.168.9.30 for users who dial in VPN

2.4 Configuration file/etc/sysctl.conf

The code is as follows Copy Code
Vi/etc/sysctl.conf

Modify the following:

The code is as follows Copy Code
Net.ipv4.ip_forward = 1

Execute after Save and exit:/sbin/sysctl-p

3. Start PPTP VPN server side:

The code is as follows Copy Code
/sbin/service pptpd Start

4, start iptables:

The code is as follows Copy Code
/sbin/service iptables Start
/sbin/iptables-t nat-a postrouting-o eth0-s 192.168.9.0/24-j Masquerade

The VPN server side configuration is complete.

During the installation, I have 800 errors in the case, reference: LINUX installation VPN 800 error

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.