『解决方案』 Linux不支持GlobalProtect软件
最近将自己的小米笔记本重装了Linux系统,整体编程体验也提升了。免去了很多繁琐复杂的环境配置,可以更专心于代码实现了。不便之处也比较明显,linux系统对国内社交应用支持力度太小了(鹅厂的wx、tx会议都莫嘚linux版本,QQ for linux也真是“穿越感”)。最近当我发现VPN都不支持Linux系统时,。。
*说明:文中IP、Mac地址均为随意设置,非真实。
两种需求:
(1)如果只是需要查看信息门户、谷歌学术等资源时,建议直接访问webvpn,获得所需资源。
(2)如果你希望:
- 获得内网IP地址
- VPN客户端般的体验
- 访问内网服务器
可以尝试openconnect方案:
step 1: 安装openconnect包(此处以ubuntu系统为例)
$sudo apt-get install openconnect
step 2:连接服务器
*注意指明协议类型
$sudo openconnect --protocol=gp vpn.bupt.edu.cn
页面会反馈:
POST https://vpn.bupt.edu.cn/ssl-vpn/prelogin.esp?tmp=tmp&clientVer=4100&clientos=Linux
Connected to 118.229.255.32:443
SSL negotiation with vpn.bupt.edu.cn
Connected to HTTPS on vpn.bupt.edu.cn
Enter login credentials
Username:
step 3:认证登陆
输入网关帐号、密码即可完成登陆
Username: 20***********
Password:
POST https://vpn.bupt.edu.cn/ssl-vpn/login.esp
GlobalProtect login returned authentication-source=GP_SSL_auto
POST https://vpn.bupt.edu.cn/ssl-vpn/getconfig.esp
Session will expire after 43200 minutes.
Tunnel timeout (rekey interval) is 180 minutes.
Idle timeout is 180 minutes.
No MTU received. Calculated 1422 for ESP tunnel
POST https://vpn.bupt.edu.cn/ssl-vpn/hipreportcheck.esp
Connected as 10.*.*.*, using SSL, with ESP in progress
ESP session established with server
ESP tunnel connected; exiting HTTPS mainloop.
此时直接访问信息门户等校内网站。
此时可以进一步验证IP地址:inet地址应该是10.x.x.x格式内网地址。
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1422
inet 10.8.8.8 netmask 255.255.255.255 destination 10.3.3.3
inet6 f444:d4aa:2285:b::441a prefixlen 64 scopeid 0x20<link>
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (未指定)
RX packets 446 bytes 387622 (387.6 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 364 bytes 34401 (34.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
补充:
如何实现 校外linux主机–>远程桌面–>校内windows主机
- 保持上一个VPN访问终端页面运行
- 利用rdesktop包实现远程桌面
安装命令:
sudo apt-get install rdesktop
连接命令:
sudo rdesktop 10.110.22.33 -u 用户名 -p 密码
即可实现校外跨系统远程桌面