文章介绍:当我们有多个服务端时,我们想Windows和macOS客户端启动时指定默认服务器,请通过下面的方式解决。
一、Anylink配置修改
1.1、windows
C:\ProgramData\Cisco\Cisco Secure Client\VPN\Profile\profile_anylink.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>
<StrictCertificateTrust>false</StrictCertificateTrust>
<RestrictPreferenceCaching>false</RestrictPreferenceCaching>
<RestrictTunnelProtocols>IPSec</RestrictTunnelProtocols>
<BypassDownloader>true</BypassDownloader>
<AutoUpdate UserControllable="false">false</AutoUpdate>
<LocalLanAccess UserControllable="true">true</LocalLanAccess>
<WindowsVPNEstablishment>AllowRemoteUsers</WindowsVPNEstablishment>
<LinuxVPNEstablishment>AllowRemoteUsers</LinuxVPNEstablishment>
<CertEnrollmentPin>pinAllowed</CertEnrollmentPin>
<CertificateMatch>
<KeyUsage>
<MatchKey>Digital_Signature</MatchKey>
</KeyUsage>
<ExtendedKeyUsage>
<ExtendedMatchKey>ClientAuth</ExtendedMatchKey>
</ExtendedKeyUsage>
</CertificateMatch>
</ClientInitialization>
<ServerList>
<HostEntry>
<HostName>公司</HostName>
<HostAddress>ip/域名+端口(443端口默认不加)</HostAddress>
</HostEntry>
</ServerList>
</AnyConnectProfile>
C:\ProgramData\Cisco\Cisco Secure Client\VPN\Profile\profile.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>
<IPProtocolSupport>IPv4</IPProtocolSupport>
<AutoReconnect UserControllable="true">
true
<AutoReconnectBehavior UserControllable="true">ReconnectAfterResume</AutoReconnectBehavior>
</AutoReconnect>
<AutoUpdate UserControllable="false">false</AutoUpdate>
<BackupServerList>
<HostAddress>ip/域名+端口(443端口默认不加)(上面的配置文件有多个HostEntry时,这里是优选显示)</HostAddress>
</BackupServerList>
<LocalLanAccess>true</LocalLanAccess>
<BypassDownloader>true</BypassDownloader>
</ClientInitialization>
<ServerList>
</ServerList>
</AnyConnectProfile>
二、macOS
sudo nano /opt/cisco/anyconnect/profile/Profile.xml
<?xml version="1.0" encoding="UTF-8"?>
<AnyConnectProfile>
<ServerList>
<HostEntry>
<User> 用户账户名称 </User>
<HostName> 自定义显示名称 </HostName>
<HostAddress> 服务器地址 </HostAddress>
</HostEntry>
<HostEntry>
<User> 用户账户名称 </User>
<HostName> 自定义显示名称 </HostName>
<HostAddress> 服务器地址 </HostAddress>
</HostEntry>
</ServerList>
</AnyConnectProfile>
三、Windows
3.1、快捷方式一
C:\Users\%username%\AppData\Local\Cisco\Cisco Secure Client\VPN
3.2、快捷方式二
%appdata%
<?xml version="1.0" encoding="UTF-8"?>
<AnyConnectPreferences>
<DefaultUser> 默认用户名 </DefaultUser>
<DefaultSecondUser/>
<ClientCertificateThumbprint/>
<ServerCertificateThumbprint/>
<DefaultHostName> 默认服务器地址 </DefaultHostName>
<DefaultHostAddress/>
<DefaultGroup> 默认组 </DefaultGroup>
<ProxyHost/>
<ProxyPort/>
<SDITokenType/>
<ControllablePreferences>
<EnableAutomaticServerSelection>false</EnableAutomaticServerSelection>
<LocalLanAccess>false</LocalLanAccess>
<BlockUntrustedServers>false</BlockUntrustedServers>
</ControllablePreferences>
</AnyConnectPreferences>