pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
psql remote database access 4+ messages / 2 participants [nested] [flat]
* psql remote database access @ 2016-11-09 18:00 Ron Watkins <rwatkins@dssolutions.com> 0 siblings, 1 reply; 4+ messages in thread From: Ron Watkins @ 2016-11-09 18:00 UTC (permalink / raw) To: pgsql-admin 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@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 ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psql remote database access @ 2016-11-10 13:53 Samed YILDIRIM <samed@reddoc.net> parent: Ron Watkins <rwatkins@dssolutions.com> 0 siblings, 1 reply; 4+ messages in thread From: Samed YILDIRIM @ 2016-11-10 13:53 UTC (permalink / raw) To: Ron Watkins <rwatkins@dssolutions.com>; pgsql-admin <div>Hi,</div><div> </div><div>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.</div><div> </div><div><span style="font-size:8pt;font-family:"Courier New";">host all all 10.0.0.254/32 md5</span></div><div> </div><div>Best regards.</div><div> </div><div><br /></div><div><br /></div><div>İyi çalışmalar.</div><div>Samed YILDIRIM</div><div><br /></div><div><br /></div><div><br /></div><div>10.11.2016, 15:47, "Ron Watkins" <rwatkins@dssolutions.com>:</div><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple"><div><p>Im sure this has been addressed somewhere, but I wasn’t able to locate any answers.</p><p>I have a postgres database running on a different host and I need to access it remotely from another box.</p><p> </p><p>Boxes are CentOS 6, and I opened the firewall port 5432 on the database server host.</p><p>Also, on the database server host, I made the following entries to <span style="font-size:8pt;font-family:"Courier New";">/var/lib/pgsql/9.6/data/pg_hba.conf.</span></p><p><span style="font-size:8pt;font-family:"Courier New";">local all all md5</span></p><p><span style="font-size:8pt;font-family:"Courier New";">host all all <a href="http://127.0.0.1/32">127.0.0.1/32</a> md5</span></p><p><span style="font-size:8pt;font-family:"Courier New";">host all all <a href="http://10.42.42.16/24">10.42.42.16/24</a> md5</span></p><p><span style="font-size:8pt;font-family:"Courier New";"> </span></p><p>When I try to use psql to attach to the remote database, I get the following error: </p><p><span style="font-size:8pt;font-family:"Courier New";">[root@host1 ~]# psql -h host2 -p 5432 -U postgres</span></p><p><span style="font-size:8pt;font-family:"Courier New";">psql: FATAL: no pg_hba.conf entry for host "10.0.0.254", user "postgres", database "postgres", SSL off</span></p></div></div> </blockquote> ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psql remote database access @ 2016-11-10 13:57 Samed YILDIRIM <samed@reddoc.net> parent: Samed YILDIRIM <samed@reddoc.net> 0 siblings, 1 reply; 4+ messages in thread From: Samed YILDIRIM @ 2016-11-10 13:57 UTC (permalink / raw) To: Ron Watkins <rwatkins@dssolutions.com>; pgsql-admin <div>Sorry, reloading of postgres is enough for pg_hba.conf changes.</div><div><br /></div><div><br /></div><div>İyi çalışmalar.</div><div>Samed YILDIRIM</div><div><br /></div><div><br /></div><div><br /></div><div>10.11.2016, 15:53, "Samed YILDIRIM" <samed@reddoc.net>:</div><blockquote type="cite"><div>Hi,</div><div> </div><div>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.</div><div> </div><div><span style="font-size:8pt;font-family:"Courier New";">host all all 10.0.0.254/32 md5</span></div><div> </div><div>Best regards.</div><div> </div><div><br /></div><div><br /></div><div>İyi çalışmalar.</div><div>Samed YILDIRIM</div><div><br /></div><div><br /></div><div><br /></div><div>10.11.2016, 15:47, "Ron Watkins" <<a href="mailto:rwatkins@dssolutions.com">rwatkins@dssolutions.com</a>>:</div><blockquote type="cite"><div lang="EN-US" link="blue" vlink="purple"><div><p>Im sure this has been addressed somewhere, but I wasn’t able to locate any answers.</p><p>I have a postgres database running on a different host and I need to access it remotely from another box.</p><p> </p><p>Boxes are CentOS 6, and I opened the firewall port 5432 on the database server host.</p><p>Also, on the database server host, I made the following entries to <span style="font-size:8pt;font-family:"Courier New";">/var/lib/pgsql/9.6/data/pg_hba.conf.</span></p><p><span style="font-size:8pt;font-family:"Courier New";">local all all md5</span></p><p><span style="font-size:8pt;font-family:"Courier New";">host all all <a href="http://127.0.0.1/32">127.0.0.1/32</a> md5</span></p><p><span style="font-size:8pt;font-family:"Courier New";">host all all <a href="http://10.42.42.16/24">10.42.42.16/24</a> md5</span></p><p><span style="font-size:8pt;font-family:"Courier New";"> </span></p><p>When I try to use psql to attach to the remote database, I get the following error: </p><p><span style="font-size:8pt;font-family:"Courier New";">[root@host1 ~]# psql -h host2 -p 5432 -U postgres</span></p><p><span style="font-size:8pt;font-family:"Courier New";">psql: FATAL: no pg_hba.conf entry for host "10.0.0.254", user "postgres", database "postgres", SSL off</span></p></div></div> </blockquote></blockquote> ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: psql remote database access @ 2016-11-10 14:37 Ron Watkins <rwatkins@dssolutions.com> parent: Samed YILDIRIM <samed@reddoc.net> 0 siblings, 0 replies; 4+ messages in thread From: Ron Watkins @ 2016-11-10 14:37 UTC (permalink / raw) To: 'Samed YILDIRIM' <samed@reddoc.net>; pgsql-admin Yes, that worked. Just had to restart server process, now it’s 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. İyi çalışmalar. 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 all 10.0.0.254/32 md5 Best regards. İyi çalışmalar. Samed YILDIRIM 10.11.2016, 15:47, "Ron Watkins" <rwatkins@dssolutions.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@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 ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2016-11-10 14:37 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-11-09 18:00 psql remote database access Ron Watkins <rwatkins@dssolutions.com> 2016-11-10 13:53 ` Samed YILDIRIM <samed@reddoc.net> 2016-11-10 13:57 ` Samed YILDIRIM <samed@reddoc.net> 2016-11-10 14:37 ` Ron Watkins <rwatkins@dssolutions.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox