All of lore.kernel.org
 help / color / mirror / Atom feed
* changing rules at a defined time
@ 2003-12-24  9:29 Payal Rathod
  2003-12-24  9:47 ` Chris Brenton
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Payal Rathod @ 2003-12-24  9:29 UTC (permalink / raw)
  To: Netfilter ML

Hi,
I have a very basic LAN setup question like,

- till 16:00 p.m. all ips can just use ftp but ips 192.168.0.1
  and 192.168.0.100 can do anything

- after 4:00 afternoon all can do anything till 5:00 after which again
  the above [1st rules] are to be applied.

I am thinking of doing,

[For step 1]: - Policy ACCEPT for FORWARD

iptables -A FORWARD -s 192.168.0.1 -p tcp -j ACCEPT
iptables -A FORWARD -s 192.168.0.100 -p tcp -j ACCEPT
iptables -A FORWARD -s 192.168.0.0/32 -p tcp --dport 21 -j ACCEPT
iptables -A FORWARD -s 0/0 -p tcp -j DROP

[For step 2]: - Policy ACCEPT for FORWARD

iptables -A FORWARD -p tcp -j ACCEPT

Maybe same for udp.


Now my question is, 

1> Do the above steps look ok? I will refine them further. Right now are
they workable.

2> If I want to change the rules at 16:00 what is the best way to change
them? I was thing of flushing with iptables -F and iptables -F -t nat
and then running the second step.
Similary at 17:00 do the same kind of flushes and run 1st step from a
file? Is this approach ok or is there anything better?

Thanks a lot in advance and bye.

With warm regards,
-Payal

-- 
For GNU/Linux Success Stories and Articles visit:
          http://payal.staticky.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-12-24 13:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-24  9:29 changing rules at a defined time Payal Rathod
2003-12-24  9:47 ` Chris Brenton
2003-12-24 10:01 ` Cedric Blancher
2003-12-24 10:11 ` Antony Stone
2003-12-24 13:26   ` Payal Rathod
2003-12-24 13:42     ` Antony Stone

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.