Amazon AWS EC2端口:连接被拒绝
我刚刚在安全组后面的一个全新AWS账户上创建了一个EC2实例,并在其中加载了一些软件.我正在当前端口4567的计算机上运行Sinatra,并已将我的安全组中的该端口打开了.此外,我能够通过SSH进入EC2实例,但无法在端口4567上进行连接.我正在使用公共IP进行连接:
I have just created an EC2 instance on a brand new AWS account, behind a security group, and loaded some software on it. I am running Sinatra on the machine on port 4567 (currently), and have opened that port in my security group to whole world. Further, I am able to ssh into the EC2 instance, but I cannot connect on port 4567. I am using the public IP to connect:
shakuras:~ tyler$ curl **.***.**.***:22
SSH-2.0-OpenSSH_6.2p2 Ubuntu-6ubuntu0.1
curl: (56) Recv failure: Connection reset by peer
shakuras:~ tyler$ curl **.***.**.***:4567
curl: (7) Failed connect to **.***.**.***:4567; Connection refused
但是我的网络服务器正在运行,因为当我从localhost卷曲时可以看到该站点:
But my webserver is running, since I can see the site when I curl from localhost:
ubuntu@ip-172-31-8-160:~$ curl localhost:4567
Hello world! Welcome
我以为可能是防火墙,但是我运行了iptables并得到了:
I thought it might be the firewall but I ran iptables and got:
ubuntu@ip-172-31-8-160:~$ sudo iptables -L
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
我对这里发生的事情非常迷惑.为什么我无法与外界联系?
I'm pretty lost on what is going on here. Why can't I connect from the outside world?