Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on an embedded linux system, which appears to be networked correctly and is running ssh (dropbear) and rpcbind. I'm setting up a server application on it, and every single thing I try results in my connections being refused. Even the simplest thing like running nc -l 5566 on the device and running nc 5566 on my laptop results in a connection refused. Even sitting on the same device and running nc 5566 fails. I've tried multiple ports both above and below 1023

So, at the moment my guess is either iptables is getting in the way, or there's a limitation about running netcat as root that I don't know. (The device is single user, so root is the only login.) My iptables looks like this:

root@at91:~# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

It didn't print, but the INPUT chain is supposed to accept for anything on lo, eth0, and eth1.

I'm stumped. Any ideas? The device does not have SELinux.

share|improve this question
Stop iptables abd try it again to be sure. service iptables stop, and then run the nc command. – Gregg Leventhal Oct 7 '13 at 20:33
What runlevel are you using? Are you sure you have networking at all? – Gregg Leventhal Oct 7 '13 at 20:36
Yes, I'm sure networking is on. I'm connected through the console as well as multiple ssh windows. Also I can ping the device. – Maxwell Bottiger Oct 7 '13 at 20:40
The box doesn't have service, or a link to iptables in the /etc/init.d directory. Also, all the modules are built into a monolithic kernel, so I can't unload netfilter by hand. – Maxwell Bottiger Oct 7 '13 at 20:41
Can you run nmap -sP <IP address> from another box to verify that the ports are all filtered/closed on this device? the nc command you have listed should work as root. It does on my 2.6 kernel Red Hat box. – Gregg Leventhal Oct 7 '13 at 20:46

You must log in to answer this question.

Browse other questions tagged .