I have an apache tomcat installed on CentOS linux on a VPS. I have opened port 8080 in iptables so that it will be visit-able from outside. My problem is that when I go to address example.com:8080 it shows nothing and connection times out. But when I write the command service iptables restart
in terminal it will work for a short while after it and again when I go to the address example.com:8080 the connection times out.
Thanks in advance.
EDITED
Current iptables configuration file in /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended
*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A PREROUTING -i eth+ -p tcp --dport 25 -j REDIRECT --to-port 8025
COMMIT
*filter
:INPUT ACCEPT [0:0]
-A INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8044 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
UPDATED
Telnet response in not responding state.
telnet ip.address 8080
Response
Connecting To that.ip.address...Could not open connection to the host, on port 8080:
Connect failed