LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-09-2014, 11:27 AM   #1
cli
Member
 
Registered: Apr 2013
Distribution: RedHat, Cent, Ubuntu
Posts: 80

Rep: Reputation: Disabled
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.
 
Old 10-09-2014, 01:21 PM   #2
pingu
Senior Member
 
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
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.
 
2 members found this post helpful.
Old 10-09-2014, 09:34 PM   #3
cli
Member
 
Registered: Apr 2013
Distribution: RedHat, Cent, Ubuntu
Posts: 80

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Tables of Contents, Indexes and Other Special Tables in Scribus LXer Syndicated Linux News 0 05-13-2011 06:30 AM
IP Tables gjagadish Linux - Networking 1 02-10-2006 06:33 PM
IP Tables gjagadish Linux - Security 1 02-10-2006 12:49 PM
what are ip tables? master Linux - Security 4 01-24-2005 08:59 PM
IP TABLES help chrisfirestar Linux - Networking 2 10-29-2003 01:24 PM


All times are GMT -5. The time now is 07:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration