Enable LDAP SSL/TLS on Windows AD

在設定Active Directory Certificate Services之前,ldaps port就是enable的,但無法使用:

netstat -na | findstr ":636"
我測試用的AD server是安裝在Windows 2012,與Reference 1的系統不同。但大致上按照它的教學就可以設定成功。

Install AD Certificate Service

打開Add Roles and Fetures Wizard後,選擇Active Directory Certificate Service,接著一直下一步就可以安裝完成。

Config AD Certificate Service

透過Server Manager選擇AD CS,然後選你的server後,會出現以下畫面:


接著點擊Action就會出現設定畫面:


除了要選擇Key的加密方式外,一直下一步就完成了。安裝完成後,直接重開機。

要透過SSL/TLS存取AD server的client,一定會遇到certificate驗證問題。所以你必須把server certificate匯出,可以透過以下command匯出為client.crt:

certutil -ca.cert client.crt