如何对连接失败进行故障排除LDAP服务器

如何对连接失败进行故障排除LDAP服务器

37863
Created On 07/14/22 21:14 PM - Last Modified 10/22/22 01:12 AM


Objective


如何解决之间的连接失败firewall和LDAP服务器当LDAPserver 在身份验证配置文件中用于身份验证目的。

Environment


  • Firewall
  • LDAP 服务器


Procedure


  1. 来自firewallCLI, 检查是否连接到LDAP服务器正在使用:
> debug authentication connection-show
  1. 检查firewall以下事件ID“auth-server-down”的系统日志可以从UI在 Monitor > Logs > System 下,带有以下过滤器( eventid eq auth-server-down )或来自CLI使用以下命令:
> show log system direction equal backward eventid equal "auth-server-down"
  1. 在Firewall,检查服务路线到LDAP服务器设备 > 设置 > 服务 > 服务路由配置 > 单击自定义 >LDAP :
如果服务路由设置为“全部使用管理界面”或“使用默认值”,则从firewallCLI:
  1. 查看IP之间的联系firewall和LDAP服务器。
    > ping host <IP address of LDAP server>
    如果 ping 成功,则继续执行 (b),否则检查网络上的物理层 1 和数据链路层 2。
  2. 对LDAP服务器:
    > traceroute host <IP address of the LDAP server>
    同样从LDAP对管理层IP的地址firewall.
  3. 允许检查IP地址(设备 > 设置 > 接口 > 单击管理 > 允许IP地址)
  4. 在上执行 tcpdumpfirewall管理界面使用此命令 ifTCP端口为 389,否则将 389 替换为相应的端口号。
    > tcpdump filter "port 389" snaplen 0
  5. 将 tcpdump 数据包捕获导出到 scp 或 tftp 服务器并对其进行分析,以找出根本原因之间的连接问题firewall和LDAP服务器。
    > scp export mgmt-pcap from mgmt.pcap to username@host:path
    进行数据包捕获LDAP服务器
    在前面步骤的 tcpdump 捕获中寻找什么
    寻找完成TCP握手。 如果 3 次握手未完成,则检查中间设备是否会丢弃此流量。
    如果使用TLS然后检查是否SSL握手完成。 如果SSL握手未完成,然后检查SSL证书上LDAP服务器没有过期。
    如果握手完成,比较两个设备上的 PCAP 以确定哪个设备可能没有关闭连接。
  1. 如果服务路由是数据平面接口,那么从firewallCLI:
    1. 查看IP之间的联系firewall数据平面接口和LDAP服务器。
      > ping source <IP address of the dataplane interface> host <IP address of LDAP server>
      如果 ping 成功,则继续执行 b,否则检查网络上的物理层 1 和数据链路层 2。
    2. 对LDAP服务器:
      > traceroute source <IP address of the dataplane interface> host <IP address of the LDAP server>
      同样从LDAP服务器命令行到IP的数据平面的地址firewall.
    3. 查看TCP之间的联系firewall和LDAP服务器通过使用在数据平面上执行数据包捕获GUI.检查知识库入门:数据包捕获
    4. 检查会话的详细信息firewallCLI.
      > show session all filter source <IP address of the dataplane interface> destination <IP address of the LDAP server>
      如果丢弃会话应该显示活动然后检查是否firewall安全policy, nat 和路由。
    5. 如果完成上述检查,则检查是否有firewall或您网络中的设备阻止了此连接。
 


Additional Information


另外如果firewall失去连接到LDAP身份验证配置文件中使用的服务器,如果用户尝试使用LDAP发送消息“无法联系LDAPserver" 将出现在 authd.log 中,如下例所示
tail mp-log authd.log

2022-07-14 11:55:59.619 -0700 Error: pan_authd_ldap_bind(pan_authd_shared_ldap.c:646): Failed to bind ldap (Can't contact LDAP server)
2022-07-14 11:55:59.620 -0700 Error: pan_auth_create_a_ldap_session(pan_auth_svr_cctxt.c:2038): Failed to bind, get out
2022-07-14 11:55:59.620 -0700 Error: _recreate_a_ldap_session(pan_auth_service_handle.c:538): failed to re-create 0th LDAP session for server: 10.16.0.14:389
2022-07-14 11:55:59.620 -0700 LDAP auth server 10.16.0.14 is down !!!

2022-07-14 11:55:59.620 -0700 debug: auth_svr_set_flag_retry_interval(pan_auth_svr.c:746): set retry-interval flag to "true" at Thu Jul 14 11:55:59 2022
2022-07-14 11:55:59.620 -0700 debug: _start_sync_auth(pan_auth_service_handle.c:617): _report_server_not_avail() succeeded
2022-07-14 11:55:59.620 -0700 debug: pan_auth_response_process(pan_auth_state_engine.c:4322): auth status: auth server not available
2022-07-14 11:55:59.620 -0700 debug: pan_auth_response_process(pan_auth_state_engine.c:4562): Auth FAILED for user "user-id" thru <"ldap-auth-profile", "shared">: remote server 10.16.0.14 of server profile "LDAP-NEW" is down, or in retry interval, or request timed out (elapsed time 30 secs, max allowed 60 secs)
2022-07-14 11:55:59.620 -0700 debug: pan_auth_response_process(pan_auth_state_engine.c:4601): Authentication failed: <profile: "ldap-auth-profile", vsys: "shared", username "user-id">

 


Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA14u000000CqYPCA0&lang=zh_CN&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail

Choose Language