centos 6.8命令行下使用pptpsetup进行pptp拨号的实现方法
centos6.8命令行下可使用pptpsetup进行pptp拨号
1.先安装ppp,pptp和pptp-setup三个包
yuminstall-yppppptppptp-setup
2.使用pptpsetup进行连接
pptpsetup--createVPN名字--server服务器IP--username用户名--password密码--encrypt--start [root@centos6-8-1~]#pptpsetup--createvpn--server192.168.127.128--usernameuser--passwordpassw d--encrypt--start Usinginterfaceppp0 Connect:ppp0<-->/dev/pts/2 CHAPauthenticationsucceeded MPPE128-bitstatelesscompressionenabled localIPaddress192.168.0.235 remoteIPaddress192.168.0.1
使用ipaddr可以看到多了一个接口ppp0:
[root@centos6-8-1~]#ipaddr
1:lo:<LOOPBACK,UP,LOWER_UP>mtu65536qdiscnoqueuestateUNKNOWN
link/loopback00:00:00:00:00:00brd00:00:00:00:00:00 inet127.0.0.1/8scopehostlo inet6::1/128scopehost valid_lftforeverpreferred_lftforever
2:eth0:<BROADCAST,MULTICAST,UP,LOWER_UP>mtu1500qdiscpfifo_faststateUPqlen1000
link/ether00:0c:29:27:eb:e7brdff:ff:ff:ff:ff:ff inet192.168.127.129/24brd192.168.127.255scopeglobaleth0 inet6fe80::20c:29ff:fe27:ebe7/64scopelink valid_lftforeverpreferred_lftforever 4:ppp0:<POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP>mtu1496qdiscpfifo_faststateUNKNOWNqlen3 link/ppp inet192.168.0.235peer192.168.0.1/32scopeglobalppp0
3.添加默认路由
routeadddefaultdevppp0
此时已经可以正常使用VPN。
如果想断开pptp连接,那就直接结束pptp进程
pkillpptp
以上所述是小编给大家介绍的centos6.8命令行下使用pptpsetup进行pptp拨号的实现方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对毛票票网站的支持!