On Fri, 16 Aug 2002, Charles Steinkuehler 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
> >
> > 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
> >
> > The intent is to block my son's internet access from 10:00pm to 7:00
> am
> > on school nights.
> >
> > I have read the man pages but don't see what I am doing wrong. Please
> > suggest what I might try.
> 
> As mentioned, your crontab syntax looks OK.  You said the commands work
> as expected from the command line...I'm not real familiar with Bering or
> shorewall, but when programs run as expected from the command line, but
> fail in cron, the problem is almost always with missing environment
> variables.  You may need to create a "wrapper" script, modify your
> command, or add some variables to your crontab file to explicitly set
> some environment variables required to get shorewall working.  Sorry I
> can't suggest any particular environment variables to look at other than
> PATH, but check the shorewall docs for anything that's required...
> 

There shouldn't be any environmental variables required for 
"/sbin/shorewall [reject|deny] <ip addr>". /sbin/shorewall sets up its own 
PATH.

-Tom
-- 
Tom Eastep    \ Shorewall - iptables made easy
AIM: tmeastep  \ http://www.shorewall.net
ICQ: #60745924  \ [EMAIL PROTECTED]



-------------------------------------------------------
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