Wondering if anyone's been able to set up a rule based on sunrise/sunset times. Here's my situation:
I've got an IP camera at a remote site that I use as a 'weather cam'. Every so many minutes, the camera uploads a snapshot via FTP to my server at home, where it's resized and uploaded to Weather Underground. The remote site is on a cellular Internet connection, so bandwidth conservation is important. As such, it makes no sense to upload multiple pictures of blackness all through the night. I've set up the following rule in Custom Firewall which takes care of this (crudely) by cutting off access from the camera during the night:
Times are in GMT, as that's what ClearOS seems to want to run in. This works well, but the times I have set up reflect twilight for roughly June 21st. There's as much as 8 more hours of darkness on December 21st, and times can shift by an hour a month or more.
Rather than trying to remember every month to log in and update the times, it would me much easier if the system would simply adjust the time-based rule a little each day.
Has anyone ever tried something like this, or have any pointers?
Thanks,
Bill
I've got an IP camera at a remote site that I use as a 'weather cam'. Every so many minutes, the camera uploads a snapshot via FTP to my server at home, where it's resized and uploaded to Weather Underground. The remote site is on a cellular Internet connection, so bandwidth conservation is important. As such, it makes no sense to upload multiple pictures of blackness all through the night. I've set up the following rule in Custom Firewall which takes care of this (crudely) by cutting off access from the camera during the night:
iptables -I FORWARD -m mac --mac-source <<WxCam MAC address>> -m time --timestart 02:30:00 --timestop 10:15:00 -j DROP
Times are in GMT, as that's what ClearOS seems to want to run in. This works well, but the times I have set up reflect twilight for roughly June 21st. There's as much as 8 more hours of darkness on December 21st, and times can shift by an hour a month or more.
Rather than trying to remember every month to log in and update the times, it would me much easier if the system would simply adjust the time-based rule a little each day.
Has anyone ever tried something like this, or have any pointers?
Thanks,
Bill
Share this post:
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »