time base iptables rule
I want to change the iptables rules based on the time of the day automatically. Is there any way to do that apart from working with "cron".
:Pengy: |
I think you need to take the cron route. As far as I know, iptables has no concept of time.
|
Thanks hangdog, actually I was just searcing on net about this then I came accross with "iptables patch-o-matic".And it says that you can create the time base rules.But I am not able to get the actual patch.
:Pengy: |
You can get patch-o-matic from the Netfilter website, but it is not trivial to implement. IIRC it requires a kernel recompilation to allow patch-o-matic support, (though it may just need to be compiled against the kernel headers, I'm not 100% sure). If you are trying to setup a relatively simple time-based ruleset, I would use cron (as Hangdog42 suggested) to just run two or more different iptables scripts. If you have a very complex time-based ruleset, the POM might be worth the effort of setting it up.
Newest patch-o-matic link: http://www.netfilter.org/files/patch...030912.tar.bz2 |
I want to change the iptables rules based on the time of the day automatically.
What would you need it for? Be specific and verbose please if you can. |
All times are GMT -5. The time now is 12:05 PM. |