TLS für OpenLDAP: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 5: | Zeile 5: | ||
=Zertifikate besorgen und an die richtigen Stellen bringen= | =Zertifikate besorgen und an die richtigen Stellen bringen= | ||
;Stammzertifikat | ;Stammzertifikat | ||
| − | /etc/ | + | /etc/ldap/ca.crt |
;Zertifikat | ;Zertifikat | ||
| − | /etc/ | + | /etc/ldap/star.it213.int.crt |
;Privater Schlüssel | ;Privater Schlüssel | ||
| − | /etc/ | + | /etc/ldap/star.it213.int.key |
=TLS LDIF vorbereiten= | =TLS LDIF vorbereiten= | ||
*vi /root/ldap/tls.ldif | *vi /root/ldap/tls.ldif | ||
| Zeile 25: | Zeile 25: | ||
- | - | ||
add: olcTLSCACertificateFile | add: olcTLSCACertificateFile | ||
| − | olcTLSCACertificateFile: /etc/ | + | olcTLSCACertificateFile: /etc/ldap/ca.crt |
- | - | ||
add: olcTLSCertificateFile | add: olcTLSCertificateFile | ||
| − | olcTLSCertificateFile: /etc/ | + | olcTLSCertificateFile: /etc/ldap/star.it213.int.crt |
- | - | ||
add: olcTLSCertificateKeyFile | add: olcTLSCertificateKeyFile | ||
| − | olcTLSCertificateKeyFile: /etc/ | + | olcTLSCertificateKeyFile: /etc/ldap/star.it213.int.key |
- | - | ||
add: olcTLSProtocolMin | add: olcTLSProtocolMin | ||
| Zeile 48: | Zeile 48: | ||
;Läuft der Port? | ;Läuft der Port? | ||
*ss -lntp | grep 636 | *ss -lntp | grep 636 | ||
| + | ;Funktioniert TLS ordentlich | ||
| + | *openssl s_client -port 636 -CAfile /etc/ldap/ca.crt -host ldap.it213.int | ||
Version vom 17. November 2025, 18:14 Uhr
LDAPS aktivieren
In der Datei /etc/default/slapd folgendes erweiteren
SLAPD_SERVICES="ldap:/// ldapi:/// ldaps:///"
Somit wird ldaps auf Port 636 freigeschaltet
Zertifikate besorgen und an die richtigen Stellen bringen
- Stammzertifikat
/etc/ldap/ca.crt
- Zertifikat
/etc/ldap/star.it213.int.crt
- Privater Schlüssel
/etc/ldap/star.it213.int.key
TLS LDIF vorbereiten
- vi /root/ldap/tls.ldif
idn: cn=config changetype: modify add: olcTLSCipherSuite olcTLSCipherSuite: NORMAL - add: olcTLSCRLCheck olcTLSCRLCheck: none - add: olcTLSVerifyClient olcTLSVerifyClient: never - add: olcTLSCACertificateFile olcTLSCACertificateFile: /etc/ldap/ca.crt - add: olcTLSCertificateFile olcTLSCertificateFile: /etc/ldap/star.it213.int.crt - add: olcTLSCertificateKeyFile olcTLSCertificateKeyFile: /etc/ldap/star.it213.int.key - add: olcTLSProtocolMin olcTLSProtocolMin: 1.2
Konfiguteren
- ldapmodify -Y EXTERNAL -H ldapi:/// -f tls.ldif
Dienst neustarten
- systemctl restart slapd
Kontolle
- Läuft der Dienst
- systemctl status slapd
- Logs anschauen
- journalctl -fu slapd
- Läuft der Port?
- ss -lntp | grep 636
- Funktioniert TLS ordentlich
- openssl s_client -port 636 -CAfile /etc/ldap/ca.crt -host ldap.it213.int