Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS7 openconnect无法连接anylink #66

Closed
TheresaQWQ opened this issue Dec 11, 2021 · 5 comments
Closed

CentOS7 openconnect无法连接anylink #66

TheresaQWQ opened this issue Dec 11, 2021 · 5 comments

Comments

@TheresaQWQ
Copy link

anylink使用的是v0.6.2

openconnect版本

[root@ecs-zPBqW ~]# openconnect --version
OpenConnect 版本 v8.10
Using GnuTLS 3.3.29. Features present: TPM, PKCS#11, RSA software token, HOTP software token, TOTP software token, Yubikey OATH, DTLS, ESP
支持的协议: anyconnect(默认), nc, gp, pulse

openconnect日志

[root@ecs-zPBqW ~]# echo "password" | openconnect -u username --passwd-on-stdin xxxx.com
POST https://xxxx.com/
已连接到 xxx.xxx.xxx.xxx:xxxx

SSL 与 xxxx.com 协商
Connected to HTTPS on xxxx.com with ciphersuite (TLS1.2)-(ECDHE-RSA-SECP256R1)-(AES-128-GCM)
XML POST 已启用
请输入你的用户名和密码
GROUP: [xxxx]:xxxx
POST https://xxxx.com/
XML POST 已启用
请输入你的用户名和密码
POST https://xxxx.com/
得到了 CONNECT 响应:HTTP/1.1 200 OK
未接收到 MTU。正在中止
创建 SSL 连接失败
@jiaxinonly
Copy link

使用openconnect,我也遇见了同样的问题,使用anyconnect也不行,会报错:
error: VPN establishment capability for a remote user is disabled. A VPN connection will not be established.

请问在centos7上该如何连接vpn呢?

@itviewer
Copy link
Contributor

目前 profile.xml 是写死到代码里了,需要修改

<WindowsVPNEstablishment>AllowRemoteUsers</WindowsVPNEstablishment>

<WindowsVPNEstablishment>AllowRemoteUsers</WindowsVPNEstablishment>

下面添加

<LinuxVPNEstablishment>AllowRemoteUsers</LinuxVPNEstablishment>

然后自己编译

附件是我自己编译好的,解压替换原来的可执行文件试试
anylink.zip

@itviewer
Copy link
Contributor

使用以下命令编译的,或许可以避免 libc 依赖
go build -ldflags '-linkmode "external" -extldflags "-static"'
anylink.zip

@bjdgyc
Copy link
Owner

bjdgyc commented Dec 28, 2021

已经修改profile文件

@jiaxinonly
Copy link

非常感谢各位,目前0.7.1版本,支持在centos7.5上,使用anyconnect和openconnect连接,0.5.1之前的版本,更改了数据库无法直接更换二进制文件,可以手动导出用户,并且保持用户名,pin码,OTP密钥一致即可

@bjdgyc bjdgyc closed this as completed Dec 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants