By step:
Operating Environment Centeros 6
* First run the following command:
cat /dev/net/tun
The return must be:
Cat:/dev/net/tun:file Descriptor in
Run:
cat /dev/ppp
The return must be:
Cat:/dev/ppp:no such device or address
If the above return is not the result of these two, please contact the VPS Customer service to open PPP and Tun permissions.
################################################
@1--Install PPP
Yum install gcc
yum Install PPP
@ Remember to load GCC
@2-----Install pptpd-use Yum installation
# Vim/etc/yum.repos.d/doylenet.repo
[Doylenet]
Name=doylenet Custom repository for CentOS
baseurl=http://files.doylenet.net/linux/yum/centos/5/i386/doylenet/
Gpgcheck=1
Gpgkey=http://files.doylenet.net/linux/yum/centos/rpm-gpg-key-rdoyle
Enabled=1
# yum Install pptpd
# Yum Update
#################################################
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* Use one-click installation
Download VPN (CentOS6 private) One-click installation package
wget http://www.hi-vps.com/shell/vpn_centos6.sh
chmod a+x vpn_centos6.sh
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Considerations for installing PPTP (VPN) on *vps
1. Necessary installation package PPP
2.PPTP Online can not directly use Yum download to, installation package needs the following
3. Configure PPTP. First we want to edit the/etc/pptpd.conf file, open the inside: Localip indicates that the IP,REMOTEIP of the server represents the IP address assigned to the client (related to the following firewall settings!). )
4. Modify kernel settings
5. Firewall settings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~·
Modify the kernel settings so that it supports forwarding. Edit/etc/sysctl.conf File:
#vim/etc/sysctl.conf
Change "Net.ipv4.ip_forward" to 1, into the following form.
Net.ipv4.ip_forward=1
Save the exit and execute the following command to take effect on it:
#sysctl -p
Note: Firewall configuration-You need to modify the!!!! based on the NIC
It should be noted that the "192.168.0.0/24″" in this directive is based on the previous configuration file in the "Localip" network segment to change, such as you set the "10.0.0.1″ network segment, it should be changed to" 10.0.0.0/24″. In addition there is a point to note is eth0, if your extranet network card is not eth0, but eth1 (such as the SoftLayer of the server is such a situation), then please remember to change the eth0 also to the corresponding network card number, otherwise it is not on the net.
We then enter the following instructions to let iptables save our forwarding rules so that we do not need to add them again after restarting the system:
#iptables-T nat-a postrouting-s 192.168.0.0/24-o Eth0-j Masquerade
Use after installation is complete
#vim /etc/ppp/chap-secrets
To add VPN users by format