Page 1 of 1

iptables setup on CentOS 5.5

Posted: Sun Jul 24, 2011 12:25 pm
by vissersj
Hello,

During step five (Enable OpenEMM access in the iptables firewall) of the installation of OpenEMM 2011 on CentOS 5.5, it was necessary to make the iptables file from scratch, because it didn't exist. If put in the following code:

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-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 tcp -m tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m state --state NEW -m tcp --dport 8044 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT

I've restarted the iptables, but got the following error:

Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: mangle filter nat [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: iptables-restore v1.3.5: iptables-restore: unable to i
'itializetable 'filter

Error occurred at line: 1
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
[FAILED]

Could someone be so kind to tell me what to change in the code to solve the error on line one?

Thanks in advance!

With kind regards,

Sjors

Re: iptables setup on CentOS 5.5

Posted: Thu Nov 24, 2011 12:47 pm
by Andrew Philips
I am also interested in this.And I couldn't find a solution on the net.The "iptables-restore --help" doesn't help.

Re: iptables setup on CentOS 5.5

Posted: Fri Jan 20, 2012 9:53 pm
by mokarram
Same result with Centos 6.2. With

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8044 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT


added to /etc/sysconfig/iptables

I get

iptables: Applying firewall rules: iptables-restore: line 13 failed

When I

/etc/init.d/iptables restart