debian VM refusing all traffic apart from http

Posted by james lewis on Server Fault See other posts from Server Fault or by james lewis
Published on 2012-12-06T21:08:12Z Indexed on 2012/12/06 23:05 UTC
Read the original article Hit count: 394

Filed under:
|
|

I've got a VM with a fresh install of Debian (wheezy) and I've installed node and mongo on it. The VM is using a bridged network connection so I was expecting to be able to point my host machines browser at the ip address of the Debian VM (port 1337 for my node example or port 28017 for my mongo status page) and see one of the two services (node or mongo). My requests are refused though.

As far as I can tell Debian allows all traffic by default and you have to manually configure iptables to drop traffic. I've checked iptables and it says it's setup to allow anything through. It looks like this:

root@devbox:/home/jlewis# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination   

As a test I setup nginx and I was able to get to the nginx landing page from my host no problems so obviously http traffic is allowed. I then set nginx up to forward all traffic upstream to mongo - no problems there, I was able to see the status page. I then did the same for my example node server and again, no problems. So http traffic is fine, but all other traffic is blocked.

Anyone know why debian might be refusing all other traffic other than iptables being setup to drop it?

EDIT - output from netstat -nltp:

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:28017         0.0.0.0:*               LISTEN      1762/mongod     
tcp        0      0 0.0.0.0:51028           0.0.0.0:*               LISTEN      1541/rpc.statd  
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2462/sshd       
tcp        0      0 127.0.0.1:1337          0.0.0.0:*               LISTEN      2794/node       
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      2274/exim4      
tcp        0      0 127.0.0.1:27017         0.0.0.0:*               LISTEN      1762/mongod     
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1510/rpcbind    
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      2189/nginx      
tcp6       0      0 :::22                   :::*                    LISTEN      2462/sshd       
tcp6       0      0 :::45335                :::*                    LISTEN      1541/rpc.statd  
tcp6       0      0 ::1:25                  :::*                    LISTEN      2274/exim4      
tcp6       0      0 :::111                  :::*                    LISTEN      1510/rpcbind    

© Server Fault or respective owner

Related posts about debian

Related posts about iptables