How to install VPN in CentOS system

  
                

VPN is a virtual private network. It has the characteristics of low cost and easy to use. It is widely used in enterprises. How to install and build VPN in Linux system? The following small series will introduce you to the CentOS installation to build a VPN.

Recommended: CentOS6.6 64-bit official version system download

[Installation] (This tutorial is set up in the previous free application of Xen V*P*S 256MB, the system is centos5 /32 bit, PPTP VPN one-click installation package system requirements for centos5 32 /64)

First, we putty login with root password, type the following command:

wget http://D.xker.com/2014/pptpd.sh

(This step is to download the installation script, optional download link: http://www.zrblog.net/sh/pptpd.sh)

After downloading the installation script, the installation is OK, one-click installation, no need to input anything, very convenient.

sh pptpd.sh

drawings:

After the installation is complete, we should note that the last line is your user password to remember. If you need to add users, just edit the /etc/ppp/chap-secrets file directly and add the username and password in the same format.

[Postscript]

OpenVZ user please check

Virtual LAN (TUN /TAP) support (code below)

cat /dev /net/tun

If the return message is:

cat: /dev/net/tun: File descriptor in bad state Description Normal

Detection is support for ppp module

cat /dev/ppp

If the return message is: cat: /dev/ppp: No such device or address Description Normal

[Follow-up]

Some OpenVZ, after installing a one-click package directly, still can't use VPN. Here, I will add a few points.

1. First, we confirm that VPS has opened TUN and PPP. The method for confirmation has been given above;

2. After installing a one-click package, you can edit the VPN link. User information (vim /etc/ppp/chap-secrets);

3. De-encrypt. Edit /etc/ppp/options.pptpd(vim /etc/ppp/options.pptpd) and add #(# require-mppe-128) in front of require-mppe-128;

4. Local Settings The encryption method is optional encryption and allows unencrypted passwords.

5. Finally restart PPTPD: /etc/init.d/pptpd restart

6. Some friends have encountered an installation error (content is about etc /ppp folder can not be found ), and propose a solution, a friend with similar circumstances can refer to it:

Edit /etc/yum/pluginconf.d/fastestmirror.conf Modify enabled=1 to enabled=0

The above is the introduction of CentOS installation VPN method. It should be noted that this method is only applicable to CentOS. As for other Linux systems, it can be used as a reference. Have you remembered it?

Copyright © Windows knowledge All Rights Reserved