PPTP 在Centos 7.1 建立方法与失效处理

# yum install pptp pptp-setup

 pptpsetup --create vpn --server  (serverName) --username (Username)  --password  (Ps) --start

但是执行的时候没有正确的返回:

查了message log:


Jan  1 21:43:03 localhost pppd[25235]: Connect: ppp0 <--> /dev/pts/1

Jan  1 21:43:03 localhost pptp[25236]: anon log[main:pptp.c:333]: The synchronous pptp option is NOT activated
Jan  1 21:43:03 localhost pptp[25244]: anon log[ctrlp_rep:pptp_ctrl.c:254]: Sent control packet type is 1 'Start-Control-Connection-Request'
Jan  1 21:43:03 localhost pptp[25244]: anon log[ctrlp_disp:pptp_ctrl.c:754]: Received Start Control Connection Reply
Jan  1 21:43:03 localhost pptp[25244]: anon log[ctrlp_disp:pptp_ctrl.c:788]: Client connection established.
Jan  1 21:43:04 localhost pptp[25244]: anon log[ctrlp_rep:pptp_ctrl.c:254]: Sent control packet type is 7 'Outgoing-Call-Request'
Jan  1 21:43:04 localhost pptp[25244]: anon log[ctrlp_disp:pptp_ctrl.c:873]: Received Outgoing Call Reply.
Jan  1 21:43:04 localhost pptp[25244]: anon log[ctrlp_disp:pptp_ctrl.c:912]: Outgoing call established (call ID 0, peer's call ID 26624).
Jan  1 21:43:04 localhost pptp[25244]: anon log[pptp_read_some:pptp_ctrl.c:559]: read returned zero, peer has closed
Jan  1 21:43:04 localhost pptp[25244]: anon log[callmgr_main:pptp_callmgr.c:266]: Closing connection (shutdown)
Jan  1 21:43:04 localhost pptp[25244]: anon log[ctrlp_rep:pptp_ctrl.c:254]: Sent control packet type is 12 'Call-Clear-Request'
Jan  1 21:43:04 localhost pptp[25244]: anon log[pptp_read_some:pptp_ctrl.c:559]: read returned zero, peer has closed
Jan  1 21:43:04 localhost pptp[25244]: anon log[call_callback:pptp_callmgr.c:81]: Closing connection (call state)

Jan  1 21:43:04 localhost pppd[25235]: Modem hangup


解决方法:

 modprobe nf_conntrack_pptp

# pppd call codelife


去除或者注释掉require-mppe-128

# vim /etc/ppp/peers/codelife

# pon vpn
# poff vpn


参考了http://ju.outofmemory.cn/entry/61068


这个时候还不能访问内网:

配置路由表

连接成功后,通过route命令可参看路由表信息

# route -n
Kernel
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值