Build a remote VPN (pptpd) for CentOS)
VPN is a virtual private network.
The virtual private network function is to establish a private network on a public network for encrypted communication. It is widely used in enterprise networks. VPN gateway implements remote access through data packet encryption and Data Packet Destination Address conversion. VPN can be classified by protocol. VPN can be implemented through servers, hardware, software, and other methods. VPN features low cost and ease of use.
1. Install the dependency package
Yum install ppp-y
2. Download The pptpd service package
Wget ftp://rpmfind.net/linux/epel/6/x86_64/pptpd-1.4.0-3.el6.x86_64.rpm
Rpm-ivh pptpd-1.4.0-3.el6.x86_64.rpm
3. modify the configuration file
Vim/etc/ppp/options.ppt pd -- configure Server DNS
Name pptpd -- specify the pptpd Service
Ms-dns 8.8.8.8 -- cancel the previous # And write DNS
Ms-dns 8.8.4.4
Vim/etc/pptpd. conf
Ppp/usr/sbin/pppd -- cancel this line of comment
Localip 154.87.20.4, 154.87.87.67, 154.87.85.73 -- cancel this line of comment. Here, I write three Internet IP addresses, indicating that three VPNs are set up.
Remoteip 192.168.0.1-10,192.168 .0.20 -- the IP address assigned to the client when connecting to the VPN Service
Vim/etc/ppp/chap-secrets -- user name used to log on to the VPN
The user name used to log on to the client is used to allocate the fixed IP address of the client to the service login password (* indicates any)
Test1 pptpd test1 *
Test2 pptpd test2 *
Test3 pptpd test3192.168.0.9
/Etc/init. d/pptpd restart -- restart the service
4. The test is successful.