EDIT: Solved… There was a hardware firewall in the way!
I installed node.js on a remote Debian GNU/Linux 6.0.4 (squeeze) server and ran this http server on port 8866.
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
console.log('Someone set up us the bomb');
}).listen(8866, "0.0.0.0");
console.log('Server running at http://0.0.0.0:8866/');
It appears to run:
node server.js
root@pod:/var/www# Server running at http://0.0.0.0:8866/
But when I go to http://213.159.xxx.xxx:8866 nothing showsand it times out. So I thought maybe my port was blocked so I started fiddling with iptables, nmap etc… But it still doesnt run. Ill show you some important output, maybe you guys can show me the way to a working server, I think im close.
Here's the result of iptables -L on the server:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:8866
fail2ban-ssh tcp -- anywhere anywhere multiport dports ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http-alt
ACCEPT tcp -- anywhere anywhere tcp dpt:8866
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:8866
ACCEPT tcp -- anywhere anywhere tcp dpt:8866
Chain fail2ban-ssh (1 references)
target prot opt source destination
RETURN all -- anywhere anywhere
And the result of nmap 213.159.xx.xxx -p 8866 -A
Starting Nmap 5.00 ( http://nmap.org ) at 2012-05-17 16:08 CEST
Someone set up us the bomb
Someone set up us the bomb
Someone set up us the bomb
Someone set up us the bomb
Interesting ports on pod (213.159.xx.xxx):
PORT STATE SERVICE VERSION
8866/tcp open unknown
Ill also add netstat:
# netstat -pan | grep 88
tcp 0 0 0.0.0.0:8866 0.0.0.0:* LISTEN 12468/node
hat is going wrong here? Are the ports closed, are they only accepting local domains or is there a tcp / http problem?
Gr.
Best Answer
From OP: