Linux CentOS PPTP VPN安装教程

pptpd VPN需要内核支持mppe,如果不支持,请联系你的服务商.

首先,在安装之前,需要检测服务器是否支持ppp,
Run the command below to test if your kernel supports MPPE and you should get a return an “ok”:
<font face="Courier New">#modprobe ppp-compress-18 && echo ok<br /></font>FATAL: Could not load /lib/modules/2.6.18-028stab066.10/modules.dep: No such file or directory

还要检测服务器是否开启了tun/tap
#cat /dev/net/tun
cat: /dev/net/tun: File descriptor in bad state 返回这样的信息说明服务器开启了tun/tap

下面开始配置.
先安装ppp和iptables.

yum install -y ppp iptables
如果出现以下情况
[root@mail ~]# yum install -y ppp iptables
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.kernel.org
 * updates: mirrors.kernel.org
 * addons: mirrors.kernel.org
 * extras: mirrors.kernel.org
http://download.lxlabs.com/download/update/CentOS-5/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: lxlabsupdate. Please verify its path and try again

请先执行  yum clean all,再执行 yum install -y ppp iptables

然后下载pptpd.

32位操作系统.

wget http://acelnmp.googlecode.com/files/pptpd-1.3.4-1.rhel5.1.i386.rpm
64位操作系统.
wget http://acelnmp.googlecode.com/files/pptpd-1.3.4-1.rhel5.1.x86_64.rpm

安装pptpd

32位操作系统

rpm -ivh pptpd-1.3.4-1.rhel5.1.i386.rpm

64位操作系统

rpm -ivh pptpd-1.3.4-1.rhel5.1.x86_64.rpm