# 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 activatedJan 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