最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

postgresql - pg_hba.conf "host all all 0.0.0.00 md5" does not work - Stack Overflow

programmeradmin2浏览0评论

I have VDS with ubuntu 24.04 and I install Postgres 16.6. My pq_hba.conf in

postgres=# SHOW hba_file;
hba_file

/etc/postgresql/16/main/pg_hba.conf
(1 row)



I wont connect to Postgres from all hosts, so I set in pq_hba.conf

local   all             postgres                                peer
local   all             all                                     peer
host all all 0.0.0.0/0 md5
host all all ::0/0 md5

when I run (after restart Postgres)

ss -nlt | grep 5432

LISTEN 0 200 127.0.0.1:5432 0.0.0.0:*

127.0.0.1:5432 insted of 0.0.0.0:5432. So only localhost can connect to my postgres. But I want connect to Postgres from all hosts.

What am I doing wrong?

发布评论

评论列表(0)

  1. 暂无评论