Linux Netfilter discussions
 help / color / mirror / Atom feed
* Time changes
@ 2003-10-22 19:44 Steffen Bisgaard - Xtrasource
  2003-10-22 20:13 ` netfilter
  2003-10-23  0:35 ` Joel Newkirk
  0 siblings, 2 replies; 5+ messages in thread
From: Steffen Bisgaard - Xtrasource @ 2003-10-22 19:44 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 439 bytes --]

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?

[-- Attachment #2: Type: text/html, Size: 1194 bytes --]

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

* Re: Time changes
  2003-10-22 19:44 Time changes Steffen Bisgaard - Xtrasource
@ 2003-10-22 20:13 ` netfilter
  2003-10-23  0:35 ` Joel Newkirk
  1 sibling, 0 replies; 5+ messages in thread
From: netfilter @ 2003-10-22 20:13 UTC (permalink / raw)
  To: sbisgaard; +Cc: [netfilter] Mailing List

Yes, you would need to utilize the time patch.  Go to the following Howto to
read up about it.
http://www.netfilter.org/documentation/HOWTO//netfilter-extensions-HOWTO-3.h
tml#ss3.19

Brandon Broyles
  ----- Original Message -----
  From: Steffen Bisgaard - Xtrasource
  To: netfilter@lists.netfilter.org
  Sent: Wednesday, October 22, 2003 3:44 PM
  Subject: Time changes


  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?



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

* Re: Time changes
  2003-10-22 19:44 Time changes Steffen Bisgaard - Xtrasource
  2003-10-22 20:13 ` netfilter
@ 2003-10-23  0:35 ` Joel Newkirk
  1 sibling, 0 replies; 5+ messages in thread
From: Joel Newkirk @ 2003-10-23  0:35 UTC (permalink / raw)
  To: sbisgaard; +Cc: netfilter

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




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

* RE: Time changes
@ 2003-10-23 14:22 Anderson, Ray
  2003-10-23 15:09 ` Josh Berry
  0 siblings, 1 reply; 5+ messages in thread
From: Anderson, Ray @ 2003-10-23 14:22 UTC (permalink / raw)
  To: firewalldude, sbisgaard; +Cc: netfilter

[-- Attachment #1: Type: text/plain, Size: 1596 bytes --]

Just a side note, if the kid isn't savvy today he will be tomorrow, and
could change the ip address of his machine.

If you have other machines and allow your internal class C to get out, you
could restrict the kid's machine by mac address matching, as it is a little
harder to forge.  Not impossible, but harder than changing an IP address.

Just my $.02.

-=Ray
---------------------------------------
[Inexperienced] pilots are really blind in the air for the first couple of
months.
Colonel Erich "Bubi" Hartmann, GAF, World's Leading Ace, Luftwaffe, WWII,
352 Victories


> -----Original Message-----
> From: Joel Newkirk [mailto:firewalldude@newkirk.us] 
> Sent: Wednesday, October 22, 2003 5:35 PM
> To: sbisgaard@xtrasource.com
> Cc: netfilter@lists.netfilter.org
> Subject: Re: Time changes
> 
> 
> 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
> 
> 
> 

[-- Attachment #2: Type: text/html, Size: 3151 bytes --]

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

* RE: Time changes
  2003-10-23 14:22 Anderson, Ray
@ 2003-10-23 15:09 ` Josh Berry
  0 siblings, 0 replies; 5+ messages in thread
From: Josh Berry @ 2003-10-23 15:09 UTC (permalink / raw)
  To: netfilter

You could also use the IPTables time patch instead of using a crontabs
entry that enables and disables the rule at specific times.


> Just a side note, if the kid isn't savvy today he will be tomorrow, and
> could change the ip address of his machine.
>
> If you have other machines and allow your internal class C to get out, you
> could restrict the kid's machine by mac address matching, as it is a
> little
> harder to forge.  Not impossible, but harder than changing an IP address.
>
> Just my $.02.
>
> -=Ray
> ---------------------------------------
> [Inexperienced] pilots are really blind in the air for the first couple of
> months.
> Colonel Erich "Bubi" Hartmann, GAF, World's Leading Ace, Luftwaffe, WWII,
> 352 Victories
>
>
>> -----Original Message-----
>> From: Joel Newkirk [mailto:firewalldude@newkirk.us]
>> Sent: Wednesday, October 22, 2003 5:35 PM
>> To: sbisgaard@xtrasource.com
>> Cc: netfilter@lists.netfilter.org
>> Subject: Re: Time changes
>>
>>
>> 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
>>
>>
>>
>


Thanks,
Josh Berry, CTO
LinkNet-Solutions
469-831-8543
josh.berry@linknet-solutions.com



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

end of thread, other threads:[~2003-10-23 15:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-22 19:44 Time changes Steffen Bisgaard - Xtrasource
2003-10-22 20:13 ` netfilter
2003-10-23  0:35 ` Joel Newkirk
  -- strict thread matches above, loose matches on Subject: below --
2003-10-23 14:22 Anderson, Ray
2003-10-23 15:09 ` Josh Berry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox