[CentOS] Centos6 iptables startup vs. restart?

Wed Apr 4 16:06:14 UTC 2012
Nataraj <incoming-centos at rjl.com>

On 04/03/2012 05:25 AM, Les Mikesell wrote:
> On Tue, Apr 3, 2012 at 5:54 AM, Dennis Jacobfeuerborn
> <dennisml at conversis.de> wrote:
>>> The iptables redirect works fine once the commands are loaded.  My
>>> problem is just that the boot-time startup isn't loading the saved
>>> state from /etc/sysconfig/iptables, but a subsequent 'service iptables
>>> restart' does - and it is something new in 6.x.
>>>
>> Did you make sure that the service is active and that the iptables service
>> is actually startet on bootup?
>>
>> Try "chkconfig --list iptables" to see if it is active and "chkconfig
>> iptables on" to activate it.
>>
> Yes, it does start, but the initial rules don't include the port
> redirection in the nat table.
>
I still think it's a timing problem.  Have you checked to see that the
proper NAT module is loaded in the kernel at the time when the iptables
rules are loaded?  At least for diagnostic purposes I would try adding a
delay in the startup.  You might even find that adding an lsmod into the
startup sequence (for diagnostic purposes) there would fix the problem. 
I have not had a chance to look at the scripts that do this in CentOS 6.

Nataraj