无法连接到我的Node.js服务器

我有一个VPS(在linode上),我安装了Node.JS。

我的server.js文件如下:

var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(1337); console.log('Server running on port 1337'); 

当我尝试在我的服务器上:

 wget http://localhost:1337 

它确实工作并下载响应。 但从外部看,谷歌浏览器正在说哎呀! Google Chrome无法连接到xxx.xxx.xx.xx:1337

这是Iptables的输出:

 Chain INPUT (policy ACCEPT) target prot opt source destination fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh ACCEPT all -- anywhere anywhere REJECT all -- anywhere loopback/8 reject-with icmp-port- unreachable ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:www ACCEPT tcp -- anywhere anywhere tcp dpt:https ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh ACCEPT icmp -- anywhere anywhere LOG all -- anywhere anywhere limit: avg 5/min burst 5 LOG level debug prefix `iptables denied: ' DROP all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:4711 ACCEPT tcp -- anywhere anywhere tcp dpt:1337 ACCEPT tcp -- anywhere anywhere tcp dpt:1337 Chain FORWARD (policy ACCEPT) target prot opt source destination DROP all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere tcp spt:1337 Chain fail2ban-ssh (1 references) target prot opt source destination RETURN all -- anywhere anywhere 

什么可能是错的? 谢谢!

尝试另一个端口。 3000应该工作。