Unable to connect to server via LDAPS

Solution 1:

Rather than specifying the SSL port after the IP address, use the LDAPS protocol in the URI with the -H switch:

ldapsearch -x -H ldaps://127.0.0.1 -D cn=[base DN] -d1

If you are connecting to a server with a self-signed certificate, you may also need to modify ldap.conf to disable certificate verification (not recomended):

HOST 127.0.0.1
PORT 636
TLS_REQCERT ALLOW

Or copy the public key of the server to the certificate list of your client.