1. 使用yum安裝ppp和pptp包yum -y install ppp
yum -y install pptp
若是yum不具有pptp,可到 http://pptpclient.sourceforge.net 下載安裝,這裏建議選用rpm包。
本人安裝採用的是:http://sourceforge.net/projects/pptpclient/files/pptp/pptp-1.7.2/pptp-1.7.2-3.rhel5.i386.rpm/downloadrpm -ivh ./pptp-1.7.2-3.rhel5.i386.rpm
2. 配置pptppptpsetup --create ***鏈接名稱(自定義) --server ×××服務器IP --username ×××用戶名 --password ×××密碼
node
執行完成之後會生成文件 /etc/ppp/peers/***鏈接名稱(自定義)服務器
編輯該文件:vi /etc/ppp/peers/***鏈接名稱(自定義)
將該文件修改並完善爲以下:
ide
# written by pptpsetup
pty "pptp ×××服務器IP --nolaunchpppd"
lock
#noauth
nobsdcomp
nodeflate
name ×××用戶名
remotename ***鏈接名稱(自定義)
ipparam ***鏈接名稱(自定義)
require-mppe-128
refuse-pap
refuse-chap
refuse-eap
refuse-mschap
編輯文件 /etc/ppp/chap-secretsvi /etc/ppp/chap-secrets
內容以下:
ui
# Secrets for authentication using CHAP
# client server secret IP addresses
×××用戶名 ***鏈接名稱(自定義) "×××密碼" *
spa
3. 複製命令
.net
cp /usr/share/doc/ppp-2.4.4/scripts/pon /usr/sbin/
cp /usr/share/doc/ppp-2.4.4/scripts/poff /usr/sbin/
chmod +x /usr/sbin/pon /usr/sbin/poff
4.撥***
pon ***鏈接名稱(自定義)code
5.查看是否鏈接
ifconfig
————————————————————————————————————-
ppp0 Link encap:Point-to-Point Protocol
inet addr:192.168.2.224 P-t-P:192.168.2.200 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1396 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:80 (80.0 b) TX bytes:80 (80.0 b)orm
————————————————————————————————————-server
6.斷開鏈接
poff ***鏈接名稱(自定義)ip
至此,安裝完成。