LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (http://www.linuxquestions.org/questions/linux-security-4/)
-   -   Verifying that TLS is used when contacting LDAP server (http://www.linuxquestions.org/questions/linux-security-4/verifying-that-tls-is-used-when-contacting-ldap-server-642051/)

kenneho 05-14-2008 01:15 AM

Verifying that TLS is used when contacting LDAP server
 
Hi.


I've set up our LDAP server and clients to use TLS. But how can I verify that the client in fact is using TLS when contacting the LDAP server?

I know that the LDAP server speaks "plain" LDAP on port 389, while speaking LDAPS on port 636. To check if the LDAP client talked on port 389 I blocked this port on the server, which caused the connection to fail. This may indicate that the client talk to this port, but I'm not sure if this is normal behavior even when it's supposed to use TLS.

Any thoughts anyone?

acid_kewpie 05-14-2008 03:28 AM

With an ssl / tls connection port 389 will never be used.

kenneho 05-14-2008 03:47 AM

Quote:

Originally Posted by acid_kewpie (Post 3152698)
With an ssl / tls connection port 389 will never be used.

That's what I thought also, but then there's "Start TLS" which can initate TLS on "insecure" ports. Can it be that the client issues a "Start TLS" on 389 instead of using port 636?

acid_kewpie 05-14-2008 04:13 AM

you know what... I stand partially corrected - you should actually prefer startTLS over ldaps by all accounts... http://www.openldap.org/faq/data/cache/605.html

so if it is over 389 you can use tcpdump / wireshark to see the data and watch for the tls session negotiation. should also be present in the ldap logs though.

kenneho 05-14-2008 08:23 AM

Quote:

Originally Posted by acid_kewpie (Post 3152720)
you know what... I stand partially corrected - you should actually prefer startTLS over ldaps by all accounts... http://www.openldap.org/faq/data/cache/605.html

so if it is over 389 you can use tcpdump / wireshark to see the data and watch for the tls session negotiation. should also be present in the ldap logs though.


I've analyzed the LDAP access log, and it looks like the client connects to port 389 using Start TLS. It would be nice to confirm this by dumping the network traffic, though. I guess wireshark can be used for such, but I would like to use any native Red Hat tools if any. Do you know of some such tools?

acid_kewpie 05-14-2008 08:28 AM

not to pull apart IP traffic to that extent, no, there's nothing, and really not supposed to be... tcpdump may show you enough data, you should be able to read unencrypted data, so if you dump the raw data and it's readable...


All times are GMT -5. The time now is 09:29 PM.