[Date Prev][Date Next]
Re: Client says Can't contact LDAP server, but it can!
- To: <email@example.com>
- Subject: Re: Client says Can't contact LDAP server, but it can!
- From: "Gustavo Mendes de Carvalho" <firstname.lastname@example.org>
- Date: Mon, 28 Jul 2008 18:38:51 -0300
- In-reply-to: <email@example.com>
- References: <firstname.lastname@example.org>
- Thread-index: AcjwqxHfFnwlXW2BRyGCMWa0dS5wgwATfLAg
I use self signed certificates with OpenLDAP, and everything works fine.
Check bellow which commands I used to create this certificate
===> Self signed certificate generation (I am using RHAS 4 Up6)
rm -fr demoCA
openssl req -newkey rsa:1024 -nodes -keyout newreq.pem -out newreq.pem
===> putting certificate files to correct place
cp demoCA/cacert.pem /etc/openldap/cacerts/cacert.pem
cp newcert.pem /etc/openldap/cacerts/servercrt.pem
cp newreq.pem /etc/openldap/cacerts/serverkey.pem
chmod 0400 /etc/openldap/cacerts/serverkey.pem
chown -R ldap:ldap /etc/openldap/cacerts
===> putting public certificate files in ldap client machines
And set in ldap config files (in ldap client machine) the correct path
When generating certificate file, be sure to specify in hostname field
"hostname -f" output command. You can try using localhost too
I hope it helps you
Gustavo Mendes de Carvalho
Date: Mon, 28 Jul 2008 09:20:23 +0200
From: Buchan Milne <email@example.com>
Subject: Re: Client says Can't contact LDAP server, but it can!
Cc: John Oliver <firstname.lastname@example.org>
Content-Type: text/plain; charset="iso-8859-1"
On Friday 25 July 2008 17:16:12 John Oliver wrote:
> On Fri, Jul 25, 2008 at 10:20:55AM +0200, Buchan Milne wrote:
> > On Friday 25 July 2008 01:13:37 John Oliver wrote:
> > > On Thu, Jul 24, 2008 at 04:04:10PM -0700, Quanah Gibson-Mount wrote:
> > > > Any client will need to know about the CA that signed your
> > > > self-signed cert.
> > >
> > > I created my certificate with:
> > >
> > > openssl req -new -x509 -nodes -out /etc/ssl/ldap.pem -keyout
> > > /etc/openldap/ssl/ldap.pem -days 3650
> > >
> > > In slapd.conf I have:
> > >
> > > TLSCertificateFile /etc/ssl/ldap.pem TLSCertificateKeyFile
> > > /etc/openldap/ssl/ldap.pem TLSCACertificateFile /etc/ssl/ldap.pem
> > >
> > > What do I need to do differently?
> > Configure the *client* ???
> The clients work perfectly with the working server. Why would they
> have to have a different configuration to talk to the backup LDAP server?
They don't necessarily need a different configuration, but it being valid
for one server doesn't guarantee it will be valid for another server,
especially when it comes to ssl, certificate validation etc.
> At the moment, I'm far more interested in getting the second LDAP
> server working than I am in having perfect security.
Then it's easy, turn off SSL.
If you don't want to do that, turn of certificate validation. It's better
than exposing keys.
Or, ensure that the "CA certificate" that the clients use contains the
certificates of the issuer of both of the server certificates, and that the
value of the subject CN on both certificates matches the name you use to
connect to the servers.