记录postgresql 无法连接发现是因为防火墙的原因,Debian系统的防火墙不是fired,iptables

版权声明:站在巨人的肩膀上,才可以看的更高更远。 https://blog.csdn.net/u011078141/article/details/88670651

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
    

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

    </section>
    

    猜你喜欢

    转载自blog.csdn.net/u011078141/article/details/88670651