Tiny Core Linux

Tiny Core Base => Micro Core => Topic started by: Holmes.Sherlock on May 20, 2012, 10:24:48 PM

Title: Settings for iptables does not persist
Post by: Holmes.Sherlock on May 20, 2012, 10:24:48 PM
I have installed iptables on the Core platform & have set up persistence successfully. But, I can't find where iptables specific settings are stored. So, all the rules I am adding are getting flushed on next reboot. Please help.
Title: Re: Settings for iptables does not persist
Post by: Juanito on May 20, 2012, 10:39:10 PM
You can do something like this:
Code: [Select]
$ touch mymarker
[do whatever causes the settings to be stored]
$ sudo find / -not -type 'd' -cnewer mymarker | grep -v "\/proc\/" | grep -v "^\/sys\/" | tee files
$ vi files

This probably requires the findutils extension
Title: Re: Settings for iptables does not persist
Post by: Holmes.Sherlock on May 20, 2012, 10:41:08 PM
You can do something like this:
Code: [Select]
$ touch mymarker
[do whatever causes the settings to be stored]
$ sudo find / -not -type 'd' -cnewer mymarker | grep -v "\/proc\/" | grep -v "^\/sys\/" | tee files
$ vi files

This probably requires the findutils extension

This seems quite dreadful set of commands to me. Can you please explain what these try to achieve?
Title: Re: Settings for iptables does not persist
Post by: Juanito on May 20, 2012, 10:43:15 PM
This will make a list of all files created after the "touch mymarker" command and thus will tell you where the iptables rules are stored.
Title: Re: Settings for iptables does not persist
Post by: Holmes.Sherlock on May 20, 2012, 10:44:30 PM
This will make a list of all files created after the "touch mymarker" command and thus will tell you where the iptables rules are stored.

I see, quite roundabout a way.
Title: Re: Settings for iptables does not persist
Post by: curaga on May 21, 2012, 02:05:01 AM
If you manually type them, they are not stored anywhere. Merely made active in the kernel.
Title: Re: Settings for iptables does not persist
Post by: Holmes.Sherlock on May 21, 2012, 02:09:47 AM
If you manually type them, they are not stored anywhere. Merely made active in the kernel.


Yes, I need to use iptables-save & iptables-restore
Title: Re: Settings for iptables does not persist
Post by: curaga on May 21, 2012, 02:15:00 AM
Those commands work on stdout and stdin, so where the results are stored is up to you :)
Title: Re: Settings for iptables does not persist
Post by: Holmes.Sherlock on May 21, 2012, 02:16:13 AM
Those commands work on stdout and stdin, so where the results are stored is up to you :)


I will store them in persistent storage & load back using startup script.