我无法通过公共 IP 连接到 Postgre。我已经尝试过的事情:
启用 DMZ 以打开端口 5432(已在https://www.yougetsignal.com/tools/open-ports/验证它已打开);
在 postgresql.conf 中将 listen_addresses 更改为 *;
将此行添加到 pg_hba.conf
host all all clientpublicip/32 trust
尝试从具有不同公共 IP 的另一个网络访问它。
我得到的错误是在 psql 命令行中:
服务器不监听 服务器不接受连接:连接库报告无法连接到服务器:连接被拒绝 (0x0000274D/10061) 服务器是否在主机“xxx.xxx.xxx.xxx”上运行并接受 TCP/IP端口 5432 上的连接?
我在 Windows 上并且已经禁用了防火墙
我想做的事:
psql -U postgres -h mypublicip
或者
psql -U postgres -h mydns
有什么建议吗?