I'm trying to configure a LDAP server with some basic security parameters, including TLS and required authenticated binding.
I have started the server, and can access it from localhost with the command:
ldapsearch -x -b 'dc=server,dc=com' 'objectclass=*' -W -D 'cn=manager,dc=server,dc=com' -H ldaps://server.com:389
When I try the same command remotely, from my computer, I get the following error message:
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
I don't know why this happens, I can ping my server and there is currently no firewall.
slapd
is launched with -h ldaps://server.com:389/
DNS server is configured in a basic way on the same server, with only a A record.
Do you have any idea ?
EDIT
I've tested from another workstation, on arch-linux, and it works!
On both computer I have TLS_REQCERT allow
in /etc/openldap/ldap.conf
, so that shouldn't be a certificate problem no?
The workstation on which the ldap query doesn't work is on Mac OS X, if that have any importance.
Some output:
Telnet:
telnet server.com 389
Trying w.x.y.z...
Connected to server.com.
Escape character is '^]'.
Iptables:
sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Netstat:
sudo netstat -lnt | grep 389
tcp 0 0 0.0.0.0:389 0.0.0.0:* LISTEN
tcp6 0 0 :::389 :::* LISTEN
I've tested without any security parameters, and I have the same result.