From: Joel Newkirk Subject: Re: Time changes Date: Wed, 22 Oct 2003 20:35:02 -0400 Sender: netfilter-admin@lists.netfilter.org Message-ID: <1066869302.2946.353.camel@alpha.newkirk.us> References: Reply-To: firewalldude@newkirk.us Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Content-Type: text/plain; charset="us-ascii" To: sbisgaard@xtrasource.com Cc: netfilter@lists.netfilter.org On Wed, 2003-10-22 at 15:44, Steffen Bisgaard - Xtrasource wrote: > Hallo list, > > A quick question: Is it possible to block access to and from a PC (say > 10.2.0.3) at a specific time, for example 21:00, and re-enable it at > 08:00 the next day using iptables - and if so how?? Yes this is the > kids PC... > It used to be real simple with ipfw - I can't remember the syntax but > something along the lines of ipfw -add (or -remove) deny (or allow) > 10.2.0.3 all > > Any ideas? Or do I need two separate iptables scripts? Not full scripts. Try creating two cron jobs - one running at 21:00 the other at 08:00. One is just: iptables -I FORWARD 1 -s 10.2.0.3 -j REJECT the other iptables -D FORWARD -s 10.2.0.3 -j REJECT j