ssl - CentOS8下anyconnect vpn的问题(IPsec协议)
问题描述
在我的机构中,我们可以使用 VPN 访问我们的服务器。为此,我们获得了一个 PKCS #12 证书,我们将其命名为 johndoe.p12 和一个 anyconnect 配置文件,我们将其命名为 johndoe.xml,它看起来像这样:
<?xml version="1.0" encoding="UTF-8"?>
<AnyConnectProfile xmlns="http://schemas.xmlsoap.org/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/encoding/ AnyConnectProfile.xsd">
<ClientInitialization>
<UseStartBeforeLogon UserControllable="false">false</UseStartBeforeLogon>
<AutomaticCertSelection UserControllable="true">true</AutomaticCertSelection>
<ShowPreConnectMessage>false</ShowPreConnectMessage>
<CertificateStore>All</CertificateStore>
<CertificateStoreOverride>false</CertificateStoreOverride>
<ProxySettings>Native</ProxySettings>
<AllowLocalProxyConnections>false</AllowLocalProxyConnections>
<AuthenticationTimeout>12</AuthenticationTimeout>
<AutoConnectOnStart UserControllable="false">false</AutoConnectOnStart>
<MinimizeOnConnect UserControllable="true">false</MinimizeOnConnect>
<LocalLanAccess UserControllable="false">false</LocalLanAccess>
<ClearSmartcardPin UserControllable="true">true</ClearSmartcardPin>
<AutoReconnect UserControllable="true">true
<AutoReconnectBehavior UserControllable="false">DisconnectOnSuspend</AutoReconnectBehavior>
</AutoReconnect>
<AutoUpdate UserControllable="false">true</AutoUpdate>
<RSASecurIDIntegration UserControllable="false">Automatic</RSASecurIDIntegration>
<WindowsLogonEnforcement>SingleLocalLogon</WindowsLogonEnforcement>
<WindowsVPNEstablishment>LocalUsersOnly</WindowsVPNEstablishment>
<AutomaticVPNPolicy>false</AutomaticVPNPolicy>
<PPPExclusion UserControllable="false">Disable
<PPPExclusionServerIP UserControllable="false"></PPPExclusionServerIP>
</PPPExclusion>
<EnableScripting UserControllable="false">false</EnableScripting>
<CertificateMatch>
<DistinguishedName>
<DistinguishedNameDefinition Operator="Equal" Wildcard="Disabled" MatchCase="Enabled">
<Name>O</Name>
<Pattern>University Hospital Jena</Pattern>
</DistinguishedNameDefinition>
<DistinguishedNameDefinition Operator="Equal" Wildcard="Disabled" MatchCase="Enabled">
<Name>OU</Name>
<Pattern>UKJatHome</Pattern>
</DistinguishedNameDefinition>
<DistinguishedNameDefinition Operator="Equal" Wildcard="Disabled" MatchCase="Enabled">
<Name>CN</Name>
<Pattern>ukj@home</Pattern>
</DistinguishedNameDefinition>
</DistinguishedName>
</CertificateMatch>
<EnableAutomaticServerSelection UserControllable="false">false
<AutoServerSelectionImprovement>20</AutoServerSelectionImprovement>
<AutoServerSelectionSuspendTime>4</AutoServerSelectionSuspendTime>
</EnableAutomaticServerSelection>
<RetainVpnOnLogoff>false
</RetainVpnOnLogoff>
</ClientInitialization>
<ServerList>
<HostEntry>
<HostName>JohnDoeatHome</HostName>
<HostAddress>vpnathome.organisation.de</HostAddress>
<UserGroup>JohnDoeatHome</UserGroup>
<PrimaryProtocol>IPsec</PrimaryProtocol>
</HostEntry>
</ServerList>
</AnyConnectProfile>
我使用 CentOS 版本 8.4.2105 和 Anyconnect 4.10.000093。每次我想连接时,我都会收到这两条消息(我猜第二条与第一条有关):
第一个:证书验证失败第二个:IPsec VPN 连接由于身份验证失败或超时而终止......
我搜索了有关证书的所有信息,但没有任何效果。我试图将证书包含在 firefox 捆绑包中(我在某个论坛中阅读过),这没问题,但我没有为 anyconnect 工作。
然后我厌倦了将证书添加到 CentOS,我将 *p12 转换为 *.pem 格式并将其复制到
/etc/pki/ca-trust/source/anchors/ /usr/share/pki/ca-trust-source/
连同命令:update-ca-trust
该证书是创建的捆绑包的一部分,但它对任何连接都没有帮助。
我最后一次尝试是openconnect。openconnect --protocol=anyconnect --xmlconfig=johndoe.xml --authgroup=JohnDoeatHome -k PKCS12 -c JohnDoe.p12 -u SECRET vpnathome.organisation.de
没有工作“登录失败”
我不知道如何进一步进行,感谢所有提示。如何将证书包含到 anyconnect 中。简介没问题。IPsec 协议会不会有问题?
解决方案
推荐阅读
- python - 与训练集损失不同,开发集的损失总是在增加
- c++ - 如何防止在省略号中使用对象
- angular - 我们如何在 app.module 和 SSR 渲染中检查 isPlatformBrowser(this.platformId)
- floating-point - 从浮点和中获取小数部分
- math - 如何计算 sympy 向量中的标量积?
- python - 使用 PyOpenGl 的 eglInitialize() 出错(错误 = 12296)
- python - ModuleNotFoundError:没有名为“django”的模块,具有虚拟环境 Python3.8
- linux - 如何从文件中读取变量,修改并将其保护到其他变量
- node.js - MongoError:不允许用户在 [test.users] 上执行操作 [find]
- mysql - 对超过百万行进行排序的分组