我可以ssh到我的EC2实例,并启动一个Web服务器上:
$ ssh -i ~/AWSKeyPair1.pem [email protected] Last login: Mon Jul 20 18:50:58 2015 from 72-21-196-64.amazon.com __| __|_ ) _| ( / Amazon Linux AMI ___|\___|___| https://aws.amazon.com/amazon-linux-ami/2015.03-release-notes/ $ echo 'Hello world' > index.html $ sudo service iptables status iptables: Firewall is not running. $ python -m SimpleHTTPServer 8888 Serving HTTP on 0.0.0.0 port 8888 ...
并从实例curl
$ curl 54.210.10.190:8888 Hello world
但是从我的笔记本电脑curl
失败
$ curl 54.210.10.190:8888 curl: (7) Failed to connect to 54.210.10.190 port 8888: Connection refused
为什么会这样? 我的安全组设置为允许来自任何地方的所有stream量( 0.0.0.0/0
),我的路由表将所有stream量路由到相应的网关。
( 前一个问题 )
确保您的AWS安全组已设置为允许使用自定义TCP规则在0.0.0.0/0端口8888上进行访问。
validation您的本地networking防火墙允许出站连接到端口8888。