Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c4qdq-0002MA-Gv for pgsql-admin@arkaria.postgresql.org; Thu, 10 Nov 2016 14:47:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c4qdq-0005rA-36 for pgsql-admin@arkaria.postgresql.org; Thu, 10 Nov 2016 14:47:50 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c4qUA-0001vi-P4 for pgsql-admin@postgresql.org; Thu, 10 Nov 2016 14:37:51 +0000 Received: from mail-pf0-x234.google.com ([2607:f8b0:400e:c00::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1c4qU0-000775-Hr for pgsql-admin@postgresql.org; Thu, 10 Nov 2016 14:37:49 +0000 Received: by mail-pf0-x234.google.com with SMTP id n85so147587220pfi.1 for ; Thu, 10 Nov 2016 06:37:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dssolutions-com.20150623.gappssmtp.com; s=20150623; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :thread-index:content-language; bh=emyczRQSgpni1yvdwts7TYjQOjtoYnbnwffFUQuZnsE=; b=ioGclJz0pDloZ1tbk67cmH3FF2d7tYVdDfNl/PqaB41q1c+2QgyA6vEvslqfDnnCuP ROt3DmCxUt37MfGTcMssCNu3+XBdi2RUfB4+T/rYQmDyfELVtAZmGCq2K+1so0nioOsl jUfH9j03I0xR6aXIOfYVx5rzwILQgTc5hEKe/2+gtLJRatYt0tIUNxwyxPi+Lfq8sYkQ JFVX7t9kBqPwQRi2Ay9913V3XzhAPc2XILXV0Xo5OQxko4pPEjwCaWea/6yR9G019kZj b3rC0+FUJONr+QK7j6VSyYqB8hoDvDPTQ3CS01U/qMbyw0PaS1dNSgX5NpWzPVBVUBig yldQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:references:in-reply-to:subject:date :message-id:mime-version:thread-index:content-language; bh=emyczRQSgpni1yvdwts7TYjQOjtoYnbnwffFUQuZnsE=; b=ldJhPK+4jTESbr807XkEDGLjLbGLb4xOA9BvsBmGi4YyIF6qXoofwNesZLVNh2j6xW tubf3bQbOatSvOF3NFW28aPqEIQf9Kf2fbIg+ykZLmqhKg6aExlfre+KuLkywYkY08vr evlM0FO8UvTDMrvajGPPHXqTJrrQRCfNdbUEq1iaFTExwYU66agbmy3L3Zadzrz050F+ SNZX06s2Mxt7WjiDGz/TOVnkCePaWVIhQTJzO+04t3pOEwT+4Yjo0j7HVzDqdoTPBniO 12tcTD8gTmD6MEYCE9zxzWFtv3+Dehr542umbThp4DNcPOpjyfBHlFcQmy/1qDi41IEN P1vA== X-Gm-Message-State: ABUngvcOCYz7RdTXm1wt4A70ml7IjIQpj3xkmrITzGrcRXD5/tGQM/C34+xZe175Xp4QeQZl X-Received: by 10.98.60.7 with SMTP id j7mr10732549pfa.129.1478788659239; Thu, 10 Nov 2016 06:37:39 -0800 (PST) Received: from RonPC (wsip-72-214-222-226.ph.ph.cox.net. [72.214.222.226]) by smtp.gmail.com with ESMTPSA id o185sm7872538pfb.24.2016.11.10.06.37.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Nov 2016 06:37:38 -0800 (PST) From: "Ron Watkins" To: "'Samed YILDIRIM'" , References: <215681478785987@web21o.yandex.ru> <239761478786264@web23o.yandex.ru> In-Reply-To: <239761478786264@web23o.yandex.ru> Subject: Re: psql remote database access Date: Thu, 10 Nov 2016 07:37:25 -0700 Message-ID: <248601d23b5f$f8053b30$e80fb190$@dssolutions.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_2487_01D23B25.4BAAA8F0" X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQH7iQSF0laDVXANBdFCE4bJ4f3aWQH4JabgAlCMYL6gXWg60A== Content-Language: en-us X-Pg-Spam-Score: -2.6 (--) 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 This is a multipart message in MIME format. ------=_NextPart_000_2487_01D23B25.4BAAA8F0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes, that worked. Just had to restart server process, now it=E2=80=99s = working. =20 From: Samed YILDIRIM [mailto:samed@reddoc.net]=20 Sent: Thursday, November 10, 2016 6:58 AM To: Ron Watkins; pgsql-admin@postgresql.org Subject: Re: [ADMIN] psql remote database access =20 Sorry, reloading of postgres is enough for pg_hba.conf changes. =20 =20 =C4=B0yi =C3=A7al=C4=B1=C5=9Fmalar. Samed YILDIRIM =20 =20 =20 10.11.2016, 15:53, "Samed YILDIRIM" : Hi, =20 It is written on error log of psql. Postgres service sees your IP as = 10.0.0.254, not 10.42.42.16. Most probably there is a NAT between your = box and Postgres service. You should add following entry to pg_hba.conf = and restart Postgres. =20 host all all 10.0.0.254/32 md5 =20 Best regards. =20 =20 =20 =C4=B0yi =C3=A7al=C4=B1=C5=9Fmalar. Samed YILDIRIM =20 =20 =20 10.11.2016, 15:47, "Ron Watkins" : Im sure this has been addressed somewhere, but I wasn=E2=80=99t able to = locate any answers. I have a postgres database running on a different host and I need to = access it remotely from another box. =20 Boxes are CentOS 6, and I opened the firewall port 5432 on the database = server host. Also, on the database server host, I made the following entries to = /var/lib/pgsql/9.6/data/pg_hba.conf. local all all md5 host all all 127.0.0.1/32 md5 host all all 10.42.42.16/24 md5 =20 When I try to use psql to attach to the remote database, I get the = following error:=20 [root@host1 ~]# psql -h host2 -p 5432 -U postgres psql: FATAL: no pg_hba.conf entry for host "10.0.0.254", user = "postgres", database "postgres", SSL off ------=_NextPart_000_2487_01D23B25.4BAAA8F0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Yes, that worked. Just had to restart server process, now = it=E2=80=99s working.

 

From:= = Samed YILDIRIM [mailto:samed@reddoc.net]
Sent: Thursday, = November 10, 2016 6:58 AM
To: Ron Watkins; = pgsql-admin@postgresql.org
Subject: Re: [ADMIN] psql remote = database access

 

Sorry, = reloading of postgres is enough for pg_hba.conf = changes.

 

 

=C4=B0yi = =C3=A7al=C4=B1=C5=9Fmalar.

Samed YILDIRIM

 

 

 

10.11.2016, 15:53, "Samed YILDIRIM" <samed@reddoc.net>:

=

Hi,

 

It is written on error log of psql. Postgres service = sees your IP as 10.0.0.254, not 10.42.42.16. Most probably there is a = NAT between your box and Postgres service. You should add following = entry to pg_hba.conf and restart Postgres.

 

host    = all           &nbs= p; = all           &nbs= p; 10.0.0.254/32          = md5

 

Best regards.

 

 

 

=C4=B0yi = =C3=A7al=C4=B1=C5=9Fmalar.

Samed YILDIRIM

 

 

 

10.11.2016, 15:47, "Ron Watkins" <rwatkins@dssolutions.com>= :

Im sure this = has been addressed somewhere, but I wasn=E2=80=99t able to locate any = answers.

I have a postgres database running on a = different host and I need to access it remotely from another = box.

 

Boxes are CentOS 6, and I = opened the firewall port 5432 on the database server = host.

Also, on the database server host, I made the = following entries to /var/lib/pgsql/9.6/data/pg_hba.conf.

local   = all           &nbs= p; = all           &nbs= p;            = ;            = md5

host    = all           &nbs= p; = all           &nbs= p; 127.0.0.1/32    &nbs= p;       md5

host    = all           &nbs= p; = all           &nbs= p; 10.42.42.16/24    =       md5

 

When I try to use psql to attach to = the remote database, I get the following error:

[root@host1 ~]# psql = -h host2 -p 5432 -U postgres

psql: FATAL:  = no pg_hba.conf entry for host "10.0.0.254", user = "postgres", database "postgres", SSL = off

------=_NextPart_000_2487_01D23B25.4BAAA8F0--