Guys, i really sorry for my english :'(
@jimp:
Is the CN of the new server cert ldapserver.example.com ?
Read all the requirements here:
https://doc.pfsense.org/index.php/LDAP_Troubleshooting#Connection-Related_Issues_.28SSL.29
Hostname Required
When connecting to LDAP with SSL, the hostname given for the server is also used to verify the server certificate. The server certificate's common name must be its hostname, and that hostname must resolve to the LDAP server's IP address, e.g. CN=ldap.example.com, and ldap.example.com is 192.168.1.5.
Let me ask a little thing - does it mean that CommonName of the RootCertificate of CA must match FQDN of machine on which CA is deployed?
I decide to try LDAPS authentication after upgrade to v2.3 and i'm confused now.
I have "WIN2008R2 with DNS+AD+CA"=$computer hereinafter ===> authentication from PFSENSE over LDAPS works!…... then does not works..... then works again, i cannot understand why it happens.
CommonName of mine CA's root certificate in not match FQDN of computer,
BUT i had success LDAP container tree request over TLS and authenticate test in diagnostics have passed success (i captured it by wireshark on computer), then goes some time and it does not work (exactly same issue like ovprit - same error in wireshark's capture and same openssl s_client -connect output) Difference is:
when i type openssl s_client -showcerts -connect dc.local.domain:636
there is answer:
CONNECTED(000000004)
–-
Certificate chain
0 s:/CN=dc.local.domain
i:/DC=domain/DC=local/CN=local-DC-CA #stupid mistake, agreedisagree
–---BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
Server certificate
subject=/CN=dc.local.domain
issuer=/DC=domain/DC=local/CN=local-DC-CA
To make it works i do stupid actions like: i've done two autentication server in pfsense - local.domain (old) and test (new).
Authentication servers=> test (settings like ovprit,besides server address) => select a container => "Could not connect to the LDAP server. Please check the LDAP configuration" on bottom of the page.
=>changing Transport to "TCP - standart" => select container (tree is appear, i see captured raw ldap requests in wireshark on computer:389) => save.
=>Authentication Servers => local.domain (settings like ovprit) => change Transport to TCP - standart => save.
=>Authentication Servers => test (settings like ovprit but Transport is TCP) => change Transport to SSL - encrypted => Select a container (tree is appears and i can see good tls session in wireshark on computer:636) => save.
Now i can success test authenticate in diagnostics and can to see TLS session in wireshark.
But then after some time has gone, it's breakes down and voila! i have issue like ovprit.
Update#1
I don't know why does it worked before. What i've done:
1. Imported ROOT CA public certificate without private key
2. Choosed it in Authentication servers => edit server =>Peer Certificate Authority
3. Profit? :S Authentication Server save and test passed success.