Linux的文本模式下VPN Client拨号

Linux下的VPN Client拨号
本文介绍的是基于RPM的安装设置,用Source的可以Skip
步骤一:使你的Linux支持MPPE
a.Dell的 Matt Domsch 做了一个RPM包,支持所谓DKMS(Dynamic Kernel Module Support)
下载并安装
# rpm --install dkms-2.0.5-1.noarch.rpm

b.加载MPPE模块支持(之前请确认你的Linux已经安装好Kernel-Source)

# rpm --install kernel_ppp_mppe-0.0.5-2dkms.noarch.rpm

c.测试是否成功

# modprobe ppp-compress-18 && echo success

步骤二:安装拨号客户端

a. 安装 ppp RPM
这是RedHat9的,http://poptop.sourceforge.net上其它版本Linux的RPM,请各取所需。没有的就下载SRPM
# rpm -ivh ppp-2.4.3-4.rhl9.i386.rpm
Note:之前请安装libpcap-0.7.2-1.i386.rpm ,其它版本的比如Trustix Linux可以先卸载原来的libpcap,从RH9的安装光盘上安装好libpcap-0.7.2-1.i386.rpm 后,再安装ppp

b.安装pptp的客户端

# rpm --install pptp-1.6.0-1.i386.rpm

步骤三:设置
a. vi /etc/ppp/chap-secrets


#client server Password IP Address
test * 12345 *

test为VPN的用户名,12345为密码

b. vi /etc/ppp/options.pptp
确定该文件中有require-mppe-128


c. vi /etc/ppp/peers/pptp
建立拨号脚本文件

pty "pptp a.b.c.d --nolaunchpppd" #a.b.c.d-VPN服务器地址
name test # test-VPN用户名
remotename PPTP
file /etc/ppp/options.pptp # 配置文件所在位置
ipparam pptp


d. 拨号
vi vpn.sh

pppd call pptp logfd 2 nodetach

chmod 700 vpn.sh

Leave a comment

Recent Entries

  • How to remove a VMHost from SCVMM 2008 R2 forcefully

    这几天碰到个问题,有个服务器原来安装的是 2008 Server Core系统,上面跑 Hyper-V,已经将其导入 SCVMM 2008 R2 来管理。最近实在是嫌 Server Core 管理太不方便,于是想把系统换成带图形界面的,也没在 SCVMM 里面把主机删除,直接就重装了,IP和计算机名什么的都没变,结果问题来了,再打开 SCVMM 的控制台,发现这台主机联系不上(当然,因为重装的没有了 Agent),就想删掉再重加,结果删除过程报错:Error (801) VMM cannot find ISO object . Recommended...

  • Outlook Mobile Update

    现在你可通过新的Microsoft Office Outlook Mobile更新程序和 Microsoft Exchange Server 2010 来保证你手上的信息是最有价值的。 这次的 Outlook Mobile 更新仅针对 Windows Mobile 6.1 的手机。 当你的手机连接到 Exchange Server 2010 时,如果有适合的更新你会收到自动的提示。 如果你的手机的系统是 Windows Mobile...

  • 哥们,我的更新汇总在哪呢?

    我刚刚在我全新的 Exchange 2010 服务器上安装了更新汇总1 - RU1, 然后运行 Get-Exchangeserver -Identity MyExchangeServer (译者: 可以用 Get-Exchangeserver -Identity MyExchangeServer | fl ExchangeVersion, AdminDisplayVersion)得到以下关于AdminsDisplayVersion 和 ExchangeVersion 的版本信息: 嗯, 这看上去有点眼熟(译者:...

  • Exchange 2010 Update Rollup 2

    Today Microsoft released Update Rollup 2 for Microsoft Exchange Server 2010. RU2 comes 3 months after the release of RU1. The list of included fixes...

  • HMC 4.0 Update Rollup 3 has been updated

    Description of Update Rollup 3 for Hosted Messaging and Collaboration 4.0http://support.microsoft.com/kb/979702/en-usMicrosoft released an update rollup that is dated December 2009. This update fixes issues that...

Close