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

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  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:3343
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           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

2 Answers 2

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

 
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.