【问题标题】:Active Directory on local server and intranet on external server本地服务器上的 Active Directory 和外部服务器上的 Intranet
【发布时间】:2010-05-06 11:11:44
【问题描述】:

我有一个本地 Active Directory 服务器和一个外部 Web 服务器,我的 Intranet 所在的位置。

$ad = ldap_connect("ldap://ip-address") or die("Couldn't connect to AD!");
ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3);
$bd = ldap_bind( $ad, "user@domain", "password") or die("Can't bind to server.");

当我在本地 Web 服务器上运行它时,它成功绑定了连接。如果我在外部服务器上运行相同的代码,则无法绑定 ldap 连接。 AD 服务器上的 389 和 636 端口都是开放的。

我已经尝试 google 寻求答案,但所有教程都是针对同一服务器上的 Active Directory 和网络服务器的。这甚至可能吗?

【问题讨论】:

  • 防火墙?尝试从远程服务器 telnet 看看会发生什么: telnet ip-address 389
  • 谢谢!端口 389 和 636 现已开放。 :) ldap_connect("ip-address") 现在可以工作,但 ldap_connect("ldaps://ip-address", 636) 不能。有谁知道为什么? o_O 它给了我这个错误:警告:ldap_bind() [function.ldap-bind]: Unable to bind to server: Can't contact LDAP server in .....

标签: php active-directory ldap external local


【解决方案1】:

关于 LDAPS,这通常与无效的 ssl 证书有关。此处描述了一种解决方法:LDAP and PHP connection failure

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-07-02
    • 1970-01-01
    • 2016-02-13
    • 1970-01-01
    • 1970-01-01
    • 2017-09-29
    • 1970-01-01
    相关资源
    最近更新 更多