Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
213.159.* looks like a colo facility in the Netherlands. Chances are you're behind a hardware firewall. Contact your host. –  ceejayoz May 17 '12 at 14:48
    
I sent a mail to my host. The pod server shouldnt be prone to any hardware firewalls tho... –  Hans Wassink May 17 '12 at 15:21
add comment

3 Answers

up vote 0 down vote accepted

From OP:

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

share|improve this answer
add comment

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.

share|improve this answer
    
Ill look into it, thanks! –  Hans Wassink May 17 '12 at 15:21
add comment

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

share|improve this answer
    
thats abracadabra to me, do you care to elaborate? –  Hans Wassink May 17 '12 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" –  rackandboneman May 17 '12 at 15:36
    
ahhh, clear tata! –  Hans Wassink May 18 '12 at 11:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.