无法连接到没有防火墙的远程服务器,端口打开

发布于 2025-01-21 05:03:22 字数 1021 浏览 2 评论 0 原文

我已经在远程服务器上设置了PostgreSQL,由于某些原因,即使打开端口,停用防火墙等,我也无法连接到服务器上的5432端口

  1. lister_addresses ='*'

postgresql.conf

show lister_addresses

“

  1. 更改了pg_hba.conf:

”

  1. 检查该端口号5432是打开的,并随 NetStat -NLP | GREP 5432

“

  1. 检查防火墙是否与sudo ufw status

“

在操作中删除错误消息。

nc -v [ip_address] 5432
watch "nc -v [ip_address] 5432"

,并且在执行两者之后,我仍然会 来自外部网络的服务器?

I have set up Postgresql on a remote server, and for some reason I cannot connect to the 5432 port on the server even after opening up the port, deactivating firewall, etc.

  1. I have checked that the database is listening to all addresses with
    listen_addresses = '*':

postgresql.conf:

postgresql.conf

SHOW listen_addresses:

SHOW listen_addresses; in psql

  1. changed pg_hba.conf:

pg_hba.conf

  1. checked that port number 5432 is open and listening with
    netstat -nlp | grep 5432

netstat result

  1. checked that firewall is inactive with sudo ufw status

firewall result

and still I get Operation timed out error message after performing both

nc -v [ip_address] 5432
watch "nc -v [ip_address] 5432"

Can anyone tell me what I can do to enable connection to the remote server from external network?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文