[CentOS] Why iptables are not working?

Wed Jan 23 22:58:46 UTC 2008
John R Pierce <pierce at hogranch.com>

Robert Spangler wrote:
> On Wednesday 23 January 2008 06:25, Tolun ARDAHANLI wrote:
>
>   
>>  in our server we dont have "iptables" command! and i am trying to install
>> it with that
>>
>>  yum -y install iptables
>>
>>  after this command it says that "...nothings to do". Do you have any
>>  suggestion for installing the iptables?
>>
>>  thanks a lot....
>>     
>
> It is most likely installed as this is default unless you tell the install 
> program not to install it.
>
> To start IPTALBES:
>
>  service iptables start
>
> To ensure it starts all the time on reboot:
>
>  chkconf --level 2345 iptables on
>   


that doesn't actually 'start iptables', rather that sets it so the 
system firewall scripts are run at startup.

/sbin/iptables isn't actually a service, its a command line tool for 
manipulating and displaying the kernel firewall rule tables.    the 
/etc/init.d/iptables 'service' script runs the rules scripts in 
/etc/sysconfig/iptables and -config files, which in turn are configured 
by lokkit or whatever.


anyone building custom firewall rules, with smoothwall or whatever, will 
probably use a different startup script...  I frequently call mine 
/etc/rc.d/rc.firewall and invoke it from my own /etc/init.d/firewall 
'service' entry.