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
I suggest you first try to add a logging rule just before the one you wrote; something like:
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:
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.
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.