B
B
beduin012018-02-16 15:42:03
PostgreSQL
beduin01, 2018-02-16 15:42:03

Why doesn't connecting to Postgres work without IPv6 permission?

Can't figure out why on Debian the connection to PostgreSQL doesn't work without IPv6 permission?

host    all             all             ::1/128                 trust

If you put md5 here, and in the IPv4 trust section, then the connection does not go, but why is IPv6 here? I connect from the localhost through the SQL manager.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Melkij, 2018-02-16
@melkij

So you are connecting via ipv6.
On localhost, unixsock is usually used in general, and not tcp loopback.
But in general, it is quite common practice to prefer ipv6 if the application did not explicitly specify the protocol, and the host addresses are known for both v6 and v4. You probably have both addresses in /etc/hosts for localhost.

V
vreitech, 2018-02-16
@fzfx

most likely the point is that ::1 also includes a subset of 127.0.0.1.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question