I have OpenLDAP 2.4.50 installed on a Alpine 3.8 system, and two Debian 10 clients - let us call them A and B - trying to connect the ldap server. My problem is that the first can and the second cannot.
A and B are identical machines, with both up-to-date Debian 10. Client A can connect the ldap server with ldapsearch -x -b "dc=mydomain,dc=tld" -H ldaps://ldap.mydomain.tld/
, but client B fails. Here is what the server shows when client B tries to connect:
Jul 16 12:46:39 reglisse local4.debug slapd[17451]: conn=1132 fd=22 ACCEPT from IP=xxx.xxx.xxx.xxx:45444 (IP=0.0.0.0:636)
Jul 16 12:46:39 reglisse local4.debug slapd[17451]: conn=1132 fd=22 TLS established tls_ssf=256 ssf=256
Jul 16 12:46:39 reglisse local4.debug slapd[17451]: conn=1132 fd=22 closed (connection lost)
- The server certificate has been built with
certbot
. - Both client A and client B can successfully read the ldap database in plain ldap (without SSL) with
ldapsearch -x -b "dc=mydomain,dc=tld" -H ldap://ldap.mydomain.tld/ -v
. This should prove that there is no network issue, and that the server correctly listens to the port 389. - Both client A and client B can successfully connect to the ldaps port with
openssl s_client -connect ldap.mydomain.tld:636 -showcerts
. This should prove that the server correctly listen to the port 636. - Both client A and client B have the same
ldap-utils
package version installed, andldd /usr/bin/ldapsearch
shows that both binaries are built against the very same libraries. This should prove that both clients are identical. - The server
slapd.conf
has absolutely nothing fancy:
suffix dc=mydomain,dc=tld
rootdn cn=admin,dc=mydomain,dc=tld
rootpw "xxxxxxxxxxx"
TLSCertificateKeyFile /etc/openldap/certs/privkey.pem
TLSCACertificateFile /etc/openldap/certs/fullchain.pem
TLSCertificateFile /etc/openldap/certs/cert.pem
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/inetorgperson.schema
So, what am I doing wrong here?