Amazon ec2 EC2虚拟服务器接收请求,但无法访问其他主机
我在Amazon AWS Ubuntu中有一个虚拟机,我甚至在那里安装了Apache2、PHP5和MySql 一切都运行良好,配置良好,我的网站运行良好 直到虚拟机突然停止访问其他主机。每一个请求都会发生这种情况 当一个PHP脚本在使用file\u get\u contents()函数时出现“连接超时”错误时,我发现了这一点 以下是吃iptables-L的结果:Amazon ec2 EC2虚拟服务器接收请求,但无法访问其他主机,amazon-ec2,Amazon Ec2,我在Amazon AWS Ubuntu中有一个虚拟机,我甚至在那里安装了Apache2、PHP5和MySql 一切都运行良好,配置良好,我的网站运行良好 直到虚拟机突然停止访问其他主机。每一个请求都会发生这种情况 当一个PHP脚本在使用file\u get\u contents()函数时出现“连接超时”错误时,我发现了这一点 以下是吃iptables-L的结果: Chain INPUT (policy ACCEPT) target prot opt source
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
可能会发生什么?检查您的安全组中的出站。@skozz我这样做了,但没有任何效果。但是进一步发现名称服务器被设置为ip Amazon。我改变了谷歌的ip,现在一切都恢复正常了。那么,我为你感到高兴:D
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 957/sshd
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 1098/mysqld
tcp6 0 0 :::22 :::* LISTEN 957/sshd
tcp6 0 0 :::443 :::* LISTEN 1145/apache2
tcp6 0 0 :::80 :::* LISTEN 1145/apache2
udp 0 0 0.0.0.0:68 0.0.0.0:* 560/dhclient
udp 0 0 0.0.0.0:18032 0.0.0.0:* 560/dhclient
udp6 0 0 :::60689 :::* 560/dhclient
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 8236 785/dbus-daemon /var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 6500 1/init @/com/ubuntu/upstart
unix 2 [ ACC ] STREAM LISTENING 8549 965/acpid /var/run/acpid.socket
unix 2 [ ACC ] SEQPACKET LISTENING 6797 324/systemd-udevd /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 8919 1098/mysqld /var/run/mysqld/mysqld.sock
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination