Re: psql remote database access

From: "Ron Watkins" <rwatkins(at)dssolutions(dot)com>
To: "'Samed YILDIRIM'" <samed(at)reddoc(dot)net>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: psql remote database access
Date: 2016-11-10 14:37:25
Message-ID: 248601d23b5f$f8053b30$e80fb190$@dssolutions.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Yes, that worked. Just had to restart server process, now it’s working.

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

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

İyi çalışmalar.

Samed YILDIRIM

10.11.2016, 15:53, "Samed YILDIRIM" <samed(at)reddoc(dot)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 all 10.0.0.254/32 md5

Best regards.

İyi çalışmalar.

Samed YILDIRIM

10.11.2016, 15:47, "Ron Watkins" <rwatkins(at)dssolutions(dot)com>:

Im sure this has been addressed somewhere, but I wasn’t 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 all md5

host all all 127.0.0.1/32 md5

host all all 10.42.42.16/24 md5

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

[root(at)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2016-11-10 14:57:57 Re: WAL size many times data size?
Previous Message Lazaro Garcia 2016-11-10 14:32:51 About PostgreSQL with .Net framework performance