Step 4: Configure LDAP server to use SSL/TLS
Now, we need to configure our LDAP server to use SSL/TLS encryption. Open the LDAP configuration file with the following command:
sudo nano /etc/ldap/ldap.conf
Add the following lines to the end of the file:
TLS_CACERT /etc/ssl/certs/ldap.crt
TLS_REQCERT never
Save and close the file.
Next, open the LDAP server configuration file with the following command:
sudo nano /etc/ldap/slapd.conf
Add the following lines to the end of the file:
TLSCACertificateFile /etc/ssl/certs/ldap.crt
TLSCertificateFile /etc/ssl/certs/ldap.crt
TLSCertificateKeyFile /etc/ssl/private/ldap.key
Save and close the file.