我在亚马逊EC2上运行的docker容器被配置为只允许来自172.17.0.0:5432的流量。我想更改此设置以允许来自公共IP地址的流量?我要使用0.0.0.0:5432->5432/tcp吗
如何更改此配置?我加入了aws ec2。
上下文,我在亚马逊网络服务ec2中的docker container / image上运行postgres。但是,我的连接请求失败,因为来自远程计算机的流量被阻止。
conn = psycopg2.connect(
host="204.xxx.xxx.xxx",
port="5432",
database="name_db",
user="postgres",
password="xxxxxxxxxx"
)
OperationalError: could not connect to server: Connection refused
Is the server running on host "204.xxx.xxx.xxx" and accepting
TCP/IP connections on port 5432?发布于 2020-12-18 19:15:19
您是否为托管docker容器的AWS服务器创建了适当的规则?
https://stackoverflow.com/questions/65354843
复制相似问题