Thread: Re: How to establish a SSL connection to a postgresql server

Re: How to establish a SSL connection to a postgresql server

From
"Jean-Yves F. Barbier"
Date:
On Mon, 19 Dec 2011 13:38:09 +0100
Christian Tonhäuser <christian.tonhaeuser@gmx.net> wrote:

> I want to establish a secure connection to the database server (which is
> hosted externally) using SSL. What do I have to do?
>
> I'm a novice regarding network administration and similar stuff. I can get a
> certificate and private key from the hosting firm.
>
> Is there any good  step-by-step guide online? It’s about the settings that
> have to be done, before even connecting.

You can use the intrinsic or something like stunnel that'll
just create the tunnel (and optionaly the connection).

Some times ago I found a very useful howto (unfortunately I've
broken my HD since, so no bookmark) that explains how to be
automagically connected by changing the client CN (if I remember
well) to the user's name.

1st step: change the port.

A head start:
http://www.postgresql.org/docs/8.3/static/libpq-ssl.html
http://www.postgresql.org/docs/current/static/ssl-tcp.html
http://www.howtoforge.com/postgresql-ssl-certificates
http://dba.stackexchange.com/questions/8580/force-postgresql-clients-to-use-ssl

--
Ignore previous fortune.