pptp怎么设置,简单PPTP服务器搭建
Windows内置了PPTP类型的VPN客户端。正是因为不需要安装客户端就可以使用,以前各平台支持比较广泛。后来因为存在安全风险,MacOS已取消了PPTP的默认支持。但Windows和Linux还是支持这种最古老的VPN连接方式。
如果控制访问IP,PPTP这种服务也是可以接受的。搭建快速,管理方便。
我们演示一下搭建过程。
获取安装脚本
git clone git://github.com/viljoviitanen/setup-simple-pptp-vpn.git
作者声明PPTP不安全,已停止更新。脚本比较老,只是在Ubuntu 12.04 或 14.04这两个平台上测试过。我们按要求准备一台14.04的Ubuntu服务器进行测试。
bash$ lsb_release -aNo LSB modules are available.Distributor ID: UbuntuDescription: Ubuntu 14.04.5 LTSRelease: 14.04Codename: trusty
安装过程
bash$ cd setup-simple-pptp-vpn/bash$ sudo bash setup.sh
就是这么简单,一键安装。
执行过程如下:
bash$ sudo bash setup.shReading package lists... DoneBuilding dependency treeReading state information... DoneThe following extra packages will be installed: bcrelayThe following NEW packages will be installed: bcrelay pptpd0 upgraded, 2 newly installed, 0 to remove and 453 not upgraded.Need to get 87.9 kB of archives.After this operation, 364 kB of additional disk space will be used.Get:1 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main bcrelay amd64 1.3.4+27+gddb30f8-1ubuntu1.1 [12.5 kB]Get:2 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main pptpd amd64 1.3.4+27+gddb30f8-1ubuntu1.1 [75.4 kB]Fetched 87.9 kB in 3s (25.4 kB/s)Selecting pviously unselected package bcrelay.(Reading database ... 171852 files and directories currently installed.)pparing to unpack .../bcrelay_1.3.4+27+gddb30f8-1ubuntu1.1_amd64.deb ...Unpacking bcrelay (1.3.4+27+gddb30f8-1ubuntu1.1) ...Selecting pviously unselected package pptpd.pparing to unpack .../pptpd_1.3.4+27+gddb30f8-1ubuntu1.1_amd64.deb ...Unpacking pptpd (1.3.4+27+gddb30f8-1ubuntu1.1) ...Processing triggers for man-db (2.6.7.1-1ubuntu1) ...Processing triggers for ureadahead (0.100.0-16) ...Setting up bcrelay (1.3.4+27+gddb30f8-1ubuntu1.1) ...Setting up pptpd (1.3.4+27+gddb30f8-1ubuntu1.1) ...Processing triggers for ureadahead (0.100.0-16) ...Reading package lists... DoneBuilding dependency treeReading state information... DoneThe following packages will be upgraded: wget1 upgraded, 0 newly installed, 0 to remove and 452 not upgraded.Need to get 270 kB of archives.After this operation, 0 B of additional disk space will be used.Get:1 http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main wget amd64 1.15-1ubuntu1.14.04.5 [270 kB]Fetched 270 kB in 2s (135 kB/s)(Reading database ... 171902 files and directories currently installed.)pparing to unpack .../wget_1.15-1ubuntu1.14.04.5_amd64.deb ...Unpacking wget (1.15-1ubuntu1.14.04.5) over (1.15-1ubuntu1.14.04.2) ...Processing triggers for install-info (5.2.0.dfsg.1-2) ...Processing triggers for man-db (2.6.7.1-1ubuntu1) ...Setting up wget (1.15-1ubuntu1.14.04.5) ...============================================================Detected your server external ip address: 121.63.163.57VPN username = vpn password = vVg-GJc-Z6L============================================================ * Restarting PoPToP Point to Point Tunneling Server pptpd
当安装完毕,默认会创建一个账号为vpn的用户,密码为随机密码。后续增加新用户可以编辑文件/etc/ppp/chap-secrets。
bash$ sudo cat /etc/ppp/chap-secrets# Secrets for authentication using CHAP# client server secret IP addressesvpn pptpd vVg-GJc-Z6L *
建议修改默认账号和密码。其中第一个字段为账号,第三个字段为密码。
安装完成后,检查一下服务状态
bash$ /etc/init.d/pptpd status * pptpd is runningbash$ /etc/init.d/pptpdUsage: /etc/init.d/pptpd {start|stop|status|restart|force-reload}
下面介绍Windows PPTP客户端的使用方法:
步骤1:在网络共享中心,添加VPN
步骤2:选择连接到工作区(VPN)
本文地址:百科问答频道 https://www.neebe.cn/wenda/935431.html,易企推百科一个免费的知识分享平台,本站部分文章来网络分享,本着互联网分享的精神,如有涉及到您的权益,请联系我们删除,谢谢!