简体   繁体   中英

Active Directory on local server and intranet on external server

I have a local Active Directory server and a external web server where my intranet is located.

$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.");

When I run this on a local web server it succesfully binds the connection. If I run the same code on the external server its unable to bind the ldap connection. Both port 389 and 636 is open on the AD server.

I've tried google for an answer, but all the tutorials is for Active Directory and webserver on the same server. Is this even possible?

Regarding LDAPS, this is often related to an invalid ssl certificate. A workaround for that is described here: LDAP and PHP connection failure

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM