SSL VPN 连接后断开
2025/10/29大约 1 分钟
SSL VPN 连接后断开
问题现象
FortiClient 在连接 SSL VPN 成功后,马上断开连接。
FortiClient 所在 PC 的真实公网 IP 为 121.211.6.3。
但在
diagnose debug application sslvpn -1的 debug 信息中,FortiClient 的公网 IP 却显示显示为 221.211.135.16(host[221.211.135.16])。diagnose debug application sslvpn -1 diagnose debug [12260:root:27]deconstruct_session_id:494 decode session id ok, user=[jszn], group=[sslvpn-group],authserver=[],portal=[tunnel-access],host[221.211.135.16],realm=[],csrf_token=[467291DF2B61CBF51DD42F8B423FFB99],idx=1,auth=1, sid=3471a060,login=1755833636,access=1755833636,saml_logout_url=no,pip=201.218.89.162,grp_info=[QOa1Sc],rmt_grp_info=[] [12260:root:27]session removed s: 0x7f8b9fd000 (root)正常的 debug 信息应为
host[121.211.6.3]:[12260:root:27]deconstruct_session_id:494 decode session id ok, user=[jszn], group=[sslvpn-group],authserver=[],portal=[tunnel-access],host[121.211.6.3],realm=[],csrf_token=[467291DF2B61CBF51DD42F8B423FFB99],idx=1,auth=1, sid=3471a060,login=1755833636,access=1755833636,saml_logout_url=no,pip=205.218.89.162,grp_info=[QOa1Sc],rmt_grp_info=[] [12260:root:27]session removed s: 0x7f8b9fd000 (root)diagnose debug application sslvpn -1的 debug 信息中,SSL VPN 连接中断的原因是source ip check failed。diagnose debug application sslvpn -1 diagnose debug ...... [12261:root:27]get_shm_session:1368 source ip check failed ......
问题原因
SSL VPN 的 source ip check failed 会导致身份验证失败,并在成功连接后几秒内终止 SSL VPN 连接。此情况可能出现在客户端使用 NAT、代理服务或负载均衡等技术,这些技术可能会在 SSL VPN 会话建立过程中更改客户端的实际公网 IP。
解决方法
允许 SSL VPN 认证会话令牌中的源 IP 与客户端实际建立连接的源 IP 地址不同的情况下,仍应能成功认证。执行以下命令禁用 SSL VPN 连接的源 IP 地址验证:
config vpn ssl settings
set auth-session-check-source-ip disable
end