Re: Psql wants to use IP6 when connecting to self using tcp... - Mailing list pgsql-general

From Tom Lane
Subject Re: Psql wants to use IP6 when connecting to self using tcp...
Date
Msg-id 1675051.1624325027@sss.pgh.pa.us
Whole thread Raw
In response to Psql wants to use IP6 when connecting to self using tcp...  (Jerry Levan <jerry.levan@gmail.com>)
List pgsql-general
Jerry Levan <jerry.levan@gmail.com> writes:
> The below fails... the 'fe80....' is the ip6 address of big box.
> [jerry@bigbox ~]$ psql -h bigbox
> psql: error: FATAL:  no pg_hba.conf entry for host "fe80::fe3f:dbff:fed1:f62e%enp7s0", user "lxxx", database "lxxx",
SSLoff 

This is mostly a matter of how your local DNS is configured,
not PG per se.  What does "nslookup bigbox" say?

> What  did I have to do get the 'fatal' above case to work?

Adjust your DNS setup to return the IPv4 address first.

Or, perhaps, change PG's listen_addresses so that it's
not listening on an IPv6 address at all.  There's not
going to be much point in that if you don't want
to put IPv6 entries into pg_hba.conf.

            regards, tom lane



pgsql-general by date:

Previous
From: Yu Watanabe
Date:
Subject: Re: How to automatically delete idle client connections?
Next
From: Stephan Knauss
Date:
Subject: Re: Psql wants to use IP6 when connecting to self using tcp...