Install and configure pptp vpn Server in centos

Source: Internet
Author: User

The full name of VPN is "Virtual Private Network", which is translated as "Virtual Private Network ". As the name suggests, we can regard a virtual private network as an internal private line of an enterprise. It can establish a proprietary communication line between two or more enterprise intranets connected to the Internet in different places through special encrypted communication protocols, it is like setting up a leased line, but it does not need to lay physical lines such as optical cables. This is like applying for a leased line from the telecommunications board, but there is no need to pay for the laying of the line, or purchase a router or other hardware equipment. VPN technology was originally one of the most important technologies of routers. Currently, VPN functions are also supported in vswitches, firewall devices, windows, and other software, the core of a VPN is to use a public network to establish a virtual private network.

A Virtual Private Network (VPN) is defined as a temporary and secure connection through a public network (usually the internet). It is a secure and stable tunnel through a chaotic public network. A Virtual Private Network is an extension of the enterprise intranet. Virtual Private Network can help remote users, company branches, business partners and suppliers to establish trusted and secure connections with the company's Intranet, and ensure secure data transmission. A virtual private network can be used for the global Internet access of increasing mobile users to achieve secure connections. It can be used to implement virtual private lines for secure communication between enterprise websites, it is used to economically and effectively connect commercial partners and users to a secure, out-of-network virtual private network.

PPTP is called Point to Point Tunneling Protocol-Point to Point tunnel protocol, which is a type of VPN protocol.

1. Install pptp vpn Server under centos

1. Install related software
32-bit edition:

Yum install-y PPP iptables
Wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.rhel5.i386.rpm
Rpm-IVH pptpd-1.3.4-2.rhel5.i386.rpm

64-bit edition:

Yum install-y PPP iptables
Wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-2.rhel5.x86_64.rpm
Rpm-IVH pptpd-1.3.4-2.rhel5.x86_64.rpm

2. Write the configuration file
① Configuration file/etc/PPP/options.ppt PD

MV/etc/PPP/options.ppt Pd/etc/PPP/options.ppt PD. Bak
VI/etc/PPP/options.ppt PD

Enter the following content:

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

 

② Configuration file/etc/PPP/chap-secrets

MV/etc/PPP/chap-secrets/etc/PPP/chap-secrets.bak.
VI/etc/PPP/chap-secrets

Enter the following content

# Secrets for authentication using chap
# Client server secret IP addresses
Myusername pptpd mypassword *

Note: Here myusername and mypassword are the login username and password of pptp vpn.

③ Configuration file/etc/pptpd. conf

MV/etc/pptpd. CONF/etc/pptpd. conf. Bak
VI/etc/pptpd. conf

Enter the following content:

Option/etc/PPP/options.ppt PD
Logwtmp
Localip 192.168.9.1
Remoteip 192.168.9.11-30

Note: dynamically allocate 192.168.9.11 to users who dial in the VPN ~ IP addresses between 192.168.9.30

④ Configuration file/etc/sysctl. conf

VI/etc/sysctl. conf

Modify the following content:

Net. ipv4.ip _ forward = 1

Run the following command after saving and exiting:

/Sbin/sysctl-P

 

3. Start the pptp vpn Server:

/Sbin/service pptpd start

 

4. Start iptables:

/Sbin/service iptables start
/Sbin/iptables-T Nat-A postrouting-O eth0-s 192.168.9.0/24-J Masquerade

 

From: http://blog.s135.com/pptp_vpn/

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.