0

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.

2
  • 213.159.* looks like a colo facility in the Netherlands. Chances are you're behind a hardware firewall. Contact your host.
    – ceejayoz
    May 17, 2012 at 14:48
  • I sent a mail to my host. The pod server shouldnt be prone to any hardware firewalls tho... May 17, 2012 at 15:21

3 Answers 3

0

From OP:

Solved... There was a hardware firewall in the way!

1

Things look good on your server.

You need to start local and work backwards. Does it work from localhost? From the local machine targeting the IP directly? Another machine on the same network? One hop away?

We have no idea what's between your client and the server in question - odds are some device is in the way, you just need to find it.

0
0

I think "spt" would work better in the OUTPUT chain ;)

3
  • thats abracadabra to me, do you care to elaborate? May 17, 2012 at 15:20
  • 1
    I thought there might be a typo in your rules, they all filter on a destination port of 8866 inbound AND outbound, which is usually incorrect for a TCP application. But it should not matter anyway since your policies are all ACCEPT, which in combination with only ACCEPT rules will not ever block anything. Now please do not set the policies to REJECT or DROP without reviewing the rules you will lock yourself out. For a standard "small" firewall, you would usually AT LEAST allow anything TCP on output and input that is "-m state --state ESTABLISHED" or "! --syn" May 17, 2012 at 15:36
  • ahhh, clear tata! May 18, 2012 at 11:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .