Linux pptp client 指定協議連接VPN(pap)

首先賣個關子:本人提供SS服務(只爲方便程序猿) https://www.ssrun.net


安裝環境:

yum install ppp pptp pptp-setup

創建VPN連接:
pptpsetup --create test --server ip --username un--password upwd--start

編輯-(使用特定協議pap):

vi /etc/ppp/peers/test

# written by pptpsetup

pty "pptp xxx.xxx.xxx.xxx --nolaunchpppd"
lock
noauth
nobsdcomp
nodeflate
name xxxx  --登錄用戶名
remotename tunnelname

ipparam tunnelname

require-mppe-128  #加密選項-可選

persist  #當連接丟失時讓pppd再次撥號

需要加入的如下協議:(這裏我需要使用pap撥號所以加入這個協議)

require-pap

下方協議可不加:

refuse-eap
refuse-chap
refuse-mschap

refuse-mschap-v2


因爲使用PAP協議撥號,所以需要/etc/ppp/pap-secrets 中 加入 撥號用的:

格式:用戶名  tunnelname “密碼” *


然後用 pppd call tunnelname noauth

tail -f /var/log/messages 查看連接日誌


應該就可以連接上了,然後在路由表中加入 路由節點:

路由走ppp0
route add -net xxx.xxx.xxx.0 netmask 255.255.255.0 dev ppp0

基本上就ok了! 希望對大夥兒有用,折騰一天的結果終於清楚了!


其他參考連接:http://www.centoscn.com/image-text/config/2014/1008/3913.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章