openldap 如何配置636端口
要在 OpenLDAP 中配置 636 端口,需要进行以下步骤:
- 安装 SSL 证书
在服务器上安装 SSL 证书。证书可以是自签名的,也可以是由受信任的证书机构颁发的。将证书保存在服务器上的某个位置。
- 配置 LDAP 服务器
打开 /etc/openldap/slapd.conf 文件。在文件末尾添加以下行:
TLSCACertificateFile /path/to/ca.crt TLSCertificateFile /path/to/server.crt TLSCertificateKeyFile /path/to/server.key
其中,/path/to/ca.crt 是证书的路径,/path/to/server.crt 是服务器证书的路径,/path/to/server.key 是服务器密钥的路径。
- 启用 SSL
找到以下行并将其取消注释:
TLSCipherSuite HIGH:MEDIUM:+SSLv2
TLSCertificateFile /path/to/server.crt
TLSCertificateKeyFile /path/to/server.key
TLSCACertificatePath /etc/ssl/certs
将其修改为:
TLSCipherSuite HIGH:MEDIUM:+SSLv3 TLSCertificateFile /path/to/server.crt TLSCertificateKeyFile /path/to/server.key TLSCACertificatePath /etc/ssl/certs
- 配置 LDAP 客户端
打开 /etc/ldap/ldap.conf 文件。找到以下行:
TLS_CACERT /etc/ssl/certs/ca-certificates.crt
TLS_REQCERT demand
取消注释并修改为:
TLS_CACERT /path/to/ca.crt TLS_REQCERT allow
其中,/path/to/ca.crt 是证书的路径。
- 重启 LDAP 服务
重启 LDAP 服务以使更改生效:
sudo systemctl restart slapd
完成以上操作后,您的 OpenLDAP 服务器应该已经配置了 636 端口。您可以使用 LDAP 客户端连接到服务器并通过 SSL 连接进行身份验证。
原文地址: https://www.cveoy.top/t/topic/HcB 著作权归作者所有。请勿转载和采集!