记录Postgresql 无法连接发现是因为端口原因,Debian系统开启端口(重要)

Open or close server ports

Open server ports for remote access

IMPORTANT: Making this application’s network ports public is a significant security risk. You are strongly advised to only allow access to those ports from trusted networks. If, for development purposes, you need to access from outside of a trusted network, please do not allow access to those ports via a public IP address. Instead, use a secure channel such as a VPN or an SSH tunnel. Follow these instructions to remotely connect safely and reliably.

By default, the Bitnami virtual machine’s firewall is configured to allow access on any port(s) required by the application and the SSH port. This implies that ports 80, 443 and 22 are usually open by default.

To open a different port:

  • Log in to the server console.
  • Execute the following command, replacing the PORT placeholder with the number of the port to be opened:

    • Debian:

      sudo ufw allow PORT
      
    • CentOS:

      sudo firewall-cmd --zone=public --permanent --add-port=PORT/tcp
      sudo firewall-cmd --reload
      

More information about modifying the firewall configuration is available on the Debian Wiki.

Close server ports and deny remote access

By default, the Bitnami virtual machine’s firewall is configured to allow access on any port(s) required by the application and the SSH port. This implies that ports 80, 443 and 22 are usually open by default.

To close an open port:

  • Log in to the server console.
  • Execute the following command, replacing the PORT placeholder with the number of the port to be closed:

    • Debian:

      sudo ufw deny PORT
      
    • CentOS:

      sudo firewall-cmd --zone=public --permanent --remove-port=PORT/tcp
      sudo firewall-cmd --reload
      
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

redelego@cloud

XXXXXXXXXXXXXXX

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值