pGina OpenLDAP TLS/SSL Windows 7
This blog continues where the original left off Configure pGina OpenLDAP Windows 7
In the first part pGina authenticated Windows 7 logins against OpenLDAP over plain LDAP on port 389, which sends passwords across the network unencrypted. This part switches the LDAP plugin to SSL on port 636, so the bind and password check are encrypted.
Prerequisites
- pGina installed and working against OpenLDAP without SSL (the original guide above).
- An OpenLDAP server that accepts LDAPS on port 636 with a certificate. Setting that up on the server side is covered in Configure LDAP over TLS CentOS 6.
- Port 636 open on the LDAP server’s firewall.
- The LDAP server name you put in pGina should match the name in the server’s certificate.
Step 1: open the plugin section
Login to pGina, and browse to the plugin section

Step 2: configure the LDAP plugin
from here select the LDAP module, and then hit “configure”

Step 3: change SSL and port
from here you need to change the SSL and port setting as follows:

this uses port 636 and SSL, the default TLS configuration
Port 636 is LDAPS: the connection is encrypted with SSL/TLS from the start, unlike StartTLS, which begins in plain text on port 389 and then upgrades.
from here hit apply, you should see a save confirmation

pGina stores its settings in the registry, so the change takes effect without a reinstall.
Step 4: test with the simulation tab
from here we need to test, so browse to the “simulation” tab
Enter your Username/password, and then click the green triangle to re-test the configuration

you should see that LDAP authentication worked.
Each stage (Authentication, Authorization, Gateway) should show True. Test this before logging off, so you are not locked out of the machine if something is wrong.
Verify from the server side
On a Linux machine you can confirm the server answers on 636 and see which certificate it presents:
openssl s_client -connect ldap.example.com:636
That’s it!
Troubleshooting
- Authentication fails after switching to SSL: check that port 636 is reachable from the Windows machine and that slapd is actually listening on ldaps.
- Certificate errors: the server name in pGina does not match the certificate, or Windows does not trust the CA that signed it. Import the CA certificate into the Local Computer Trusted Root Certification Authorities store.
- It worked on port 389 but not 636: make sure the port was changed together with the SSL setting; SSL on port 389 will not work.
Newer releases
Windows 7 is out of support, so plan to move these machines to a current Windows release. On the server side, Red Hat stopped shipping the OpenLDAP server in RHEL 8 and later, where 389 Directory Server is the supported option; see pGina with 389 Directory Server. Client-side TLS testing is covered in OpenLDAP over TLS: Client Setup and Testing.
Hosted Windows/Linux Servers at www.zwiegnet.com/go
Related guides: Configure pGina Windows 7 389 Directory Server Authentication | Configure LDAP over TLS CentOS 6

1 Comment