Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xwq29-0003Qy-F2 for pgsql-admin@arkaria.postgresql.org; Fri, 05 Dec 2014 10:22:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xwq28-00086E-VA for pgsql-admin@arkaria.postgresql.org; Fri, 05 Dec 2014 10:22:45 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xwq28-00083J-2j for pgsql-admin@postgresql.org; Fri, 05 Dec 2014 10:22:44 +0000 Received: from lb2-smtp-cloud3.xs4all.net ([194.109.24.26]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1Xwq23-0000lH-EK for pgsql-admin@postgresql.org; Fri, 05 Dec 2014 10:22:41 +0000 Received: from dragonslair.fritz.box ([83.161.157.169]) by smtp-cloud3.xs4all.net with ESMTP id PmNZ1p00P3faSfF01mNaYx; Fri, 05 Dec 2014 11:22:35 +0100 Content-Type: multipart/alternative; boundary="Apple-Mail=_D26A0FE5-41EC-46F6-89A3-ECFA1544DED0" Mime-Version: 1.0 (Mac OS X Mail 8.0 \(1990.1\)) Subject: Re: How to enable SSL on client From: reiner peterke In-Reply-To: Date: Fri, 5 Dec 2014 11:22:33 +0100 Cc: "pgsql-admin@postgresql.org" Message-Id: References: To: "Rajagopalan, Jayashree" X-Mailer: Apple Mail (2.1990.1) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --Apple-Mail=_D26A0FE5-41EC-46F6-89A3-ECFA1544DED0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 5, 2014, at 10:37 AM, Rajagopalan, Jayashree = wrote: >=20 > Hi all: > =20 > I=E2=80=99m on postgres 9.0.18. Want to enable SSL for the DB = connections. > The binaries are build including the openssl. > =20 > I modified the postgresql.conf =E2=80=93 for ssl=3Don. > Copied the server.crt in the data folder. > Modified pg_hba.conf - to add: >=20 > =E2=80=9Chostssl all all 0.0.0.0/0 md5=E2=80=9D > =20 > Getting the following errors in the logs when I start DB: > FATAL: no pg_hba.conf entry for host "127.0.0.1", user "myuser", = database "mydb", SSL off > =20 > Can someone share the right procedure to enable SSL on client? > I=E2=80=99ve created ~/.posgresql directory and added the client.crt = and server.key. > =20 > Regards > Jayashree Hi Jayashree, I was recently setting this up, if i remember correctly to get the = client to use SSL, i set the PGSSLMODE environment variable to prefer = or require. Unfortunately I don=E2=80=99t work with that system anymore so i cannot = just look at the settings. Let me know if that helps. Reiner --Apple-Mail=_D26A0FE5-41EC-46F6-89A3-ECFA1544DED0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
On Dec 5, 2014, at 10:37 AM, Rajagopalan, Jayashree <Jayashree.Rajagopalan@emc.com> wrote:

Hi = all:
 
I=E2=80=99m= on postgres 9.0.18. Want to enable SSL for the DB connections.
The = binaries are build including the openssl.
 
I modified the postgresql.conf =E2=80=93 = for ssl=3Don.
Copied the server.crt in the  data folder.
Modified = pg_hba.conf  - to add:

=E2=80=9Chostssl  = all      =    all        = 0.0.0.0/0       md5=E2=80=9D
 
Getting = the following errors in the logs when I start DB:
FATAL:  no pg_hba.conf entry for host "127.0.0.1", user = "myuser", database "mydb", SSL off
 
Can someone share the right procedure = to enable SSL on client?
I=E2=80=99ve created ~/.posgresql directory and added the = client.crt and server.key.
 
Regards
Jayashree

Hi Jayashree,

I was recently setting this up, if i = remember correctly to get the client to use SSL, i set the =  PGSSLMODE environment variable to prefer or require.
Unfortunately I don=E2=80=99t work with that system anymore = so i cannot just look at the settings.

Let me know if that helps.

Reiner

= --Apple-Mail=_D26A0FE5-41EC-46F6-89A3-ECFA1544DED0--