红联Linux门户
Linux帮助

Centos7下安装pptp客户端

发布时间:2017-07-12 09:56:13来源:linux网站作者:luminary
1.使用yum安装ppp和pptp
yum install ppp pptp
 
2.配置pptp
pptpsetup --create vpn连接名称(自定义) --server VPN服务器IP --username VPN用户名 --password VPN密码
执行完成以后会生成文件 /etc/ppp/peers/vpn连接名称(自定义)
编辑该文件:
# written by pptpsetup
pty "pptp VPN服务器IP --nolaunchpppd"
lock
#noauth
nobsdcomp
nodeflate
name VPN用户名
remotename vpn连接名称(自定义)
ipparam 服务器ip
require-mppe
 
3.复制命令
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.拨vpn
pon vpn连接名称(自定义)
 
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)
————————————————————————————————————-
 
6.断开连接
poff vpn连接名称(自定义)
至此,安装完成。
 
7.连接完毕要添加路由才能上网
route add default dev ppp0
 
本文永久更新地址:http://www.linuxdiyf.com/linux/31936.html