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