我无法成功地从AWS实例中获取服务器ip地址或本地主机,但在其他任何地方连接都是工作的。
当我运行sudo netstat -nlp时,我得到以下信息:
bitnami@ip-172-31-89-32:/opt/bitnami$ sudo netstat -nlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 12023/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 616/sshd
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN 583/inetd
tcp6 0 0 :::9821 :::* LISTEN 12346/node /opt/bit
tcp6 0 0 :::3110 :::* LISTEN 12322/node /opt/bit
tcp6 0 0 :::80 :::* LISTEN 11065/httpd
tcp6 0 0 :::22 :::* LISTEN 616/sshd
tcp6 0 0 :::3000 :::* LISTEN 6459/node /opt/bitn
tcp6 0 0 :::443 :::* LISTEN 11065/httpd
udp 0 0 0.0.0.0:68 0.0.0.0:* 404/dhclient
udp 0 0 127.0.0.1:323 0.0.0.0:* 594/chronyd
udp6 0 0 ::1:323 :::* 594/chronyd
udp6 0 0 fe80::1011:baff:fe4:546 :::* 487/dhclient 请帮帮忙
把我的桌子都冲红了
iptables -L -n -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
# sudo ip6tables -L -n -v
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination 请帮忙,有什么办法解决这个问题吗?在AWS安全组上,端口80和443是开放的。
安全组入站规则:
F 212
安全组出站规则:
所有0.0.0.0/0
发布于 2022-03-23 08:23:26
你的处境似乎是:
。
当通过EC2的公共IP地址连接到VPC实例时,流量将退出VPC,因特网网关将执行反向NAT,然后流量将重新进入VPC。因此,将使用“安全组规则”。(如果通过localhost或专用IP地址进行连接,则通信量不会退出实例。)
端口443的入站安全组设置如下:
TCP 443 105.112.62.35/32
这些规则意味着连接将只允许从和中获取。您的Amazon实例没有使用这些IP地址之一,因此Security拒绝对实例的访问。
https://stackoverflow.com/questions/71582624
复制相似问题