Server Fault is a question and answer site for system and network administrators. 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

Here is my iptables, i am unable to connect to a web application hosted on 3343 depite opening it, is there an error?

[root@ip-10-128-74-111 ~]# iptables -L -n
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     tcp  --             tcp dpt:22
ACCEPT     tcp  --             state NEW tcp dpt:3343
ACCEPT     all  --  
ACCEPT     all  --             state RELATED,ESTABLISHED

Chain FORWARD (policy DROP)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
share|improve this question
you've probably already checked, but the service shows up in a netstat -lnt, right? – Michael Lowman Aug 2 '11 at 17:32
up vote 1 down vote accepted

I suggest you first try to add a logging rule just before the one you wrote; something like:

iptable -I INPUT 1 -p tcp --dport 3343 -j LOG;

this way you can monitor if the traffic is actually getting to your server; if the traffic is actually getting to your server, take a look at the outgoing packets; maybe packets reach your application, but they can't travel back because of routing tables or anything else; if you can confirm the incoming packets get to your application, try with:

iptables -I INPUT 1 -p tcp --sport 3343 -j LOG

THis way you can monitor which kind of packets, if any at all, your application is sending out, and through which inteface.

Also, I assume you've no nat in place, so the iptables -t nat --list -n is empty.

share|improve this answer

It turns out that I am using amazon ec, and I needed to set the security group setting on top of this. Thank you all.

share|improve this answer

Your Answer


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.