LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   CentOS 5x, IpTables dont work port 80 and 3784. (https://www.linuxquestions.org/questions/linux-security-4/centos-5x-iptables-dont-work-port-80-and-3784-a-617157/)

linuxy 01-29-2008 10:12 AM

CentOS 5x, IpTables dont work port 80 and 3784.
 
Hiii!

Well.. problems with 80 (Apache), 3784 (Ventrilo) port :(.

¿¿Why this message??
"Connection refused"
"Unable to connect to remote host"

This is my config (IpTables):
-A INPUT -j RH-Firewall-1-INPUT
-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 3784 -j ACCEPT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -m icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p esp -j ACCEPT
-A RH-Firewall-1-INPUT -p ah -j ACCEPT
-A RH-Firewall-1-INPUT -d 224.0.0.251 -p udp -m udp --dport 5353 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited

Please, can help me??
Thx all..

Linuxy.

Micro420 01-29-2008 11:07 AM

I'm not an iptables expert, but I try to keep it simple, which has always worked for me. For example,

Code:

iptables -A RH-Firewall-1-INPUT -p tcp --dport 80 -j ACCEPT
Also, if you are using a router or NAT, to forward those ports to the correct host.


All times are GMT -5. The time now is 08:04 AM.