【问题标题】:why can't I access my postgres from remote?为什么我不能从远程访问我的 postgres?
【发布时间】:2018-09-29 23:08:48
【问题描述】:

我在 Ubuntu 服务器上安装了 Postgres 10.3 服务器。

我做了必要的设置,这些设置总是足以让我的笔记本电脑从 PGAdmin 访问它,但这次它不起作用。

我尝试了以下步骤:

listen_addresses = '*'
host all all 0.0.0.0/0 trust
ufw allow 5432
Postgresql restarted
Server rebooted
Server pinged with success
Restarted the VPN-Client
direct IP instead of VPN-IP
disabled IPTABLES

本地可以连接服务器,但是远程还是不行。

当我尝试连接时,似乎不是 postgres 阻止了它,而是之前的一些东西:

Unable to connect to server:

could not connect to server: Connection timed out (0x0000274C/10060)
Is the server running on host "10.8.0.50" and accepting
TCP/IP connections on port 5432?

可能是什么原因?

【问题讨论】:

  • 该错误表示机器之间的 TCP 通信无法正常工作。它可能是丢弃数据包的防火墙。
  • iptables 没有“打开”,在 sfw 上我确实允许它......我还缺少另一个防火墙吗?

标签: postgresql timeout remote-access


【解决方案1】:

设置服务器后,Plesk 已安装。

Plesk 有自己的防火墙,它拒绝连接。允许后,它工作得完美无缺。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-10-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-09-25
    • 2010-09-27
    • 1970-01-01
    相关资源
    最近更新 更多