netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Arcus <shop@open-t.co.uk>
Cc: netfilter@vger.kernel.org
Subject: Re: Iptables "-m time" option doesn't update when the clock changes
Date: Thu, 29 Mar 2012 10:30:21 +0100	[thread overview]
Message-ID: <4F742BAD.20002@open-t.co.uk> (raw)
In-Reply-To: <alpine.LNX.2.01.1203291111080.27349@frira.zrqbmnf.qr>

Hi,

On 29/03/12 10:12, Jan Engelhardt wrote:
> On Thursday 2012-03-29 11:10, Sebastian Arcus wrote:
>
>> I'm using the following line in my iptables firewall to block internet access
>> for one of the machines on the network for one hour a day:
>>
>> Code:
>>
>> iptables -A FORWARD -p ALL -o $INET_IFACE -m mac --mac-source $BLOCKED_MAC1 -m
>> time --timestart $BLOCKED_TIMESTART1 --timestop $BLOCKED_TIMESTOP1 -j DROP
>>
>>
>> Everything works fine - except that when the clocks change from winter time to
>> summer time (in UK) - the rule keeps on working on the old time.
>
> This is documented behavior, see manpage (preferably that of a recent
> release).

Thank you for that. According to my manpage:

"--localtz
    Interpret the times given for --datestart, --datestop,  --timestart 
and --timestop to be local kernel time. (Default)"

It sounds like the rule above should be using the local time (default). 
It still doesn't explain why it is stuck on the time before the clock 
change though?

  reply	other threads:[~2012-03-29  9:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-29  9:10 Iptables "-m time" option doesn't update when the clock changes Sebastian Arcus
2012-03-29  9:12 ` Jan Engelhardt
2012-03-29  9:30   ` Sebastian Arcus [this message]
2012-03-29 10:00     ` Jan Engelhardt
2012-03-29 10:21       ` Sebastian Arcus
2012-03-29 10:45         ` Jan Engelhardt
2012-03-29 13:45         ` /dev/rob0
2012-04-02 19:57           ` Sebastian Arcus
2012-04-02 22:07             ` /dev/rob0
2012-04-03 11:31               ` Sebastian Arcus
2012-04-04  9:35                 ` John Haxby
2012-04-04 13:14                   ` /dev/rob0
2012-04-04 13:52                     ` John Haxby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F742BAD.20002@open-t.co.uk \
    --to=shop@open-t.co.uk \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).