LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   IP Tables help (https://www.linuxquestions.org/questions/linux-newbie-8/ip-tables-help-4175521570/)

cli 10-09-2014 10:27 AM

IP Tables help
 
Hi All,
May I know iptables rules to allow/deny particular source/ports till particular time. For example I want to allow ftp to source 192.168.137.123 till 3 days. And after 3 days that rule should automatically get delete from the INPUT chain. How this can be achieved?
Expecting your kind help.

pingu 10-09-2014 12:21 PM

I don't kmow any way to create a rule with a timestamp that automatically deletes the rule after a specified time.
What you can do is to write a small shell-script that deletes the rule, then add the script to crontab.

cli 10-09-2014 08:34 PM

Thanks for the reply pingu.
Ok, if not able delete the rule automatically, I can delete it either manually or with script. But at least can we add IPTables rule to accept ftp till further 3 days by counting epoch value from now.


All times are GMT -5. The time now is 05:42 PM.