problem with iptables firewall
I am trying to run an application on Redhat Linux on a non-standard port. I have a firewall that uses iptables. I created a script that will first flush the iptables rules, then load the rules.
So, to open port 9090, I added this:
/sbin/iptables -A INPUT -p tcp --dport 9090 -j ACCEPT
I then run the script to update the iptables.
I run nmap -p 9090 my.ip and it shows that port 9090 is closed.
If I flush the iptables and try it again, I get the same thing.
Does the port have to be attached to some application to show as being open, or is it open just by virtue of the iptable rule? It almost appears as the iptables are not doing anything.
Obviously, I am a bit confused and would appreciate any tips.
more questions about iptables Firewall and open ports
Okay, I think I think my understanding of this has expanded a bit. However, I am still stuck. I have an application that is supposed to run on port 9090. I install the RPM and everything looks fine. When I try to access it, it says I can't connect. I have an iptables script that allows me to enter rules and update when I need to. I had entered a rule that opened port 9090. However, I can't connect at that port. So, I flush all rules. I still can't connect. However, when I run nmap or netstat, even specifically on that port, it shows it as closed.
I would like to narrow this down to a firewall/access or application issue.
Any ideas about how to proceed to figure this out?