Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvV8r-00058I-6Y for pgsql-general@arkaria.postgresql.org; Tue, 22 Jun 2021 01:23:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lvV8q-0002uD-07 for pgsql-general@arkaria.postgresql.org; Tue, 22 Jun 2021 01:23:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvV8p-0002pf-My for pgsql-general@lists.postgresql.org; Tue, 22 Jun 2021 01:23:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lvV8n-0006rN-Oe for pgsql-general@lists.postgresql.org; Tue, 22 Jun 2021 01:23:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 15M1Nljl1675052; Mon, 21 Jun 2021 21:23:47 -0400 From: Tom Lane To: Jerry Levan cc: pgsql-general@lists.postgresql.org Subject: Re: Psql wants to use IP6 when connecting to self using tcp... In-reply-to: References: Comments: In-reply-to Jerry Levan message dated "Mon, 21 Jun 2021 19:44:16 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1675050.1624325027.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 21 Jun 2021 21:23:47 -0400 Message-ID: <1675051.1624325027@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Jerry Levan 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", SSL off 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