Hi Kory,

--- Kory Krofft <[EMAIL PROTECTED]> wrote:
> I would like to have cron run the following commands at appropriate
> times:
> 
> shorewall reject 192.168.1.4
> shorewall allow 192.168.1.4

Do these commands work as expected when executed from the command line
(not from the crontab file?)  If they do then the problem is probably
within the cron mechanism.

> I have attempted to add them to /etc/crontab directly but they do not
> run.
> I entered them as so:
> 
> 0 22 * * 0,1,2,3,4  root /sbin/shorewall reject 192.168.1.4
> 
> 0 7 * * 1,2,3,4,5  root /sbin/shorewall allow 192.168.1.4

Your syntax looks fine.  I tried adding a test in my /etc/crontab file:

  * * * * * root /bin/date >> /tmp/mycrontest.txt

and it seems to work fine... I wanted to test if I had to restart cron.
I didn't have to.  Are these lines of yours showing up in /var/log/syslog ?
I'm getting messages like:

  Aug 16 20:42:01 firewall /usr/sbin/cron[27416]: (*system*) RELOAD
(/etc/crontab)
  Aug 16 20:42:02 firewall /USR/SBIN/CRON[16716]: (root) CMD (   /bin/date >>
/tmp/mycrontest.txt)

> The intent is to block my son's internet access from 10:00pm to 7:00 am 
> on school nights. 

Sounds like a good idea.  I might do something like this to keep my
dad from playing GO all night long ;).
 
> I have read the man pages but don't see what I am doing wrong. Please 
> suggest what I might try.

I'm not sure what else I can suggest.  Sorry, maybe others can help.

Good luck!


__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
------------------------------------------------------------------------
leaf-user mailing list: [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to