Install and configure the pptp vpn Server in CentOS 5

Source: Internet
Author: User

1. Install pptp vpn Server under centos5 (pptpd VPN requires Kernel support for mppe)
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.
The configuration steps are as follows:

1. Install ppp and iptables. (skip this step if you confirm the installation)

yum install -y ppp iptables  

2. Download and install pptpd

32-bit Edition

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

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  

3. Configure/etc/pptpd. conf

echo localip 192.168.88.1 >> /etc/pptpd.conf   echo remoteip 192.168.88.8-88 >> /etc/pptpd.conf  

Note: dynamically allocate 192.168.88.8 to users who dial in the VPN ~ IP addresses between 192.168.88.88

Add a vpn user

echo myusername pptpd mynpassword \* >> /etc/ppp/chap-secrets  

Note: Here myusername and mypassword are the login username and password of pptp vpn, and the * number after the password is retained

Set DNS to Google DNS.

echo ms-dns 8.8.8.8 >> /etc/ppp/options.pptpd   echo ms-dns 8.8.4.4 >> /etc/ppp/options.pptpd  

Edit the/etc/sysctl. conf file, modify the kernel settings, and enable forwarding.

sed -i 's/net.ipv4.ip_forward\ =\ 0/net.ipv4.ip_forward\ =\ 1/g' /etc/sysctl.conf  

Change net. ipv4.ip _ forward = 0 to 1.

Run the following command to make the configuration take effect.

sysctl -p  

Enable iptables forwarding

/sbin/iptables -t nat -A POSTROUTING -s 192.168.88.0/24 -o eth0 -j MASQUERADE  

Save firewall rules

/etc/init.d/iptables save  

Finally, set iptables and pptpd to automatically start upon startup.

chkconfig pptpd on   chkconfig iptables on  

Start pptpd Service

/etc/init.d/pptpd start  

Or

service pptpd start  

After successful startup, you can log on to your pptpdvpn using the account myusername password mypassword.

Ii. pptp vpn Client configuration in Windows

Create a connection by referencing the legend

\

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.