From: John Haxby <john.haxby@oracle.com>
To: Sebastian Arcus <shop@open-t.co.uk>
Cc: netfilter@vger.kernel.org, /dev/rob0 <rob0@gmx.co.uk>
Subject: Re: Iptables "-m time" option doesn't update when the clock changes
Date: Wed, 04 Apr 2012 10:35:33 +0100 [thread overview]
Message-ID: <4F7C15E5.3010506@oracle.com> (raw)
In-Reply-To: <4F7ADFA2.9040507@open-t.co.uk>
On 03/04/12 12:31, Sebastian Arcus wrote:
>>> Thanks for the suggestion. However, restarting the firewall (which
>>> flushes and re-writes the rules) makes absolutely no difference. I
>>
>> Did you substitute the changed time? I don't see how using different
>> times in your rules would make no difference. Indeed, if not changing
>> times, reloading the same rules would make no difference.
>
> Sorry - you are right - I didn't substitute the times in the firewall
> rules. On the other hand - a script which would restart the machine is
> easier (in this particular case) - than one which would amend the
> firewall rules and reload them.
Not sure if this is relevant, but getting a local time in UTC in a shell
script isn't hard:
date --utc -d "$(date "+%H:%M:%S +%z" -d 09:00:00)" +%H:%M:%S
In California right now that gives 16:00:00 and in the UK 08:00:00
You could use that to reload your firewall rules on a daily basis (after
the time the clocks change) or just for the date that the clocks change
(last Sunday in March and October respectively in the UK).
jch
next prev parent reply other threads:[~2012-04-04 9:35 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
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 [this message]
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=4F7C15E5.3010506@oracle.com \
--to=john.haxby@oracle.com \
--cc=netfilter@vger.kernel.org \
--cc=rob0@gmx.co.uk \
--cc=shop@open-t.co.uk \
/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).