我有一个在端口 5005 上运行的程序,该端口正在侦听并可通过 localhost 访问:
znc-admin:~/.znc$ netstat -tulpn | grep 5005
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:5005 0.0.0.0:* LISTEN 25476/znc
znc-admin:~/.znc$ wget -p http://localhost:5005
--2014-11-26 11:25:21-- http://localhost:5005/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:5005... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1790 (1.7K) [text/html]
Saving to: `localhost:5005/index.html'
100%[===================================================>] 1,790 --.-K/s in 0s
2014-11-26 11:25:21 (155 MB/s) - `localhost:5005/index.html' saved [1790/1790]
Loading robots.txt; please ignore errors.
--2014-11-26 11:25:21-- http://localhost:5005/robots.txt
Connecting to localhost (localhost)|127.0.0.1|:5005... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26 [text/plain]
Saving to: `localhost:5005/robots.txt'
100%[===================================================>] 26 --.-K/s in 0s
2014-11-26 11:25:21 (2.87 MB/s) - `localhost:5005/robots.txt' saved [26/26]
FINISHED --2014-11-26 11:25:21--
Total wall clock time: 0.01s
Downloaded: 2 files, 1.8K in 0s (88.2 MB/s)
不幸的是,该端口似乎从这个端口转发测试网站关闭:http ://www.yougetsignal.com/tools/open-ports/
并且页面http://<my ip>:5005
在我的浏览器中超时。
这让我发疯,我错过了什么?
我觉得这很简单,但也许这会对某人有所帮助。我只需要通过我的 AWS 控制台向我的安全组(即我的防火墙)添加一个例外。
在花了一个小时检查服务器的防火墙之后,我曾多次遇到过这种确切的情况。所以我希望这会提醒我自己和其他人检查其他潜在的“防火墙”!