cron or ipfw problem!

Nathan Kinkade nkinkade at
Fri Feb 20 12:51:37 PST 2004

On Fri, Feb 20, 2004 at 11:33:45PM +0300, Marwan Sultan wrote:
> Hello bsd,
>   I have FreeBSD 4.8R, NATd, ipfw enabled.
>   I want to add a rule to ipfw which activate from 3AM to 3PM : says:
>   ipfw 05000 add deny all from to any
>   So I created a shell script lets say says the above rule and
>   I chmod +x the script.
>   Second shell script lets say to delete this ipfw which sure
>   says ipfw delete 05000
>   So in this case I have to shell scripts one will Activate the
>   ipfw rule (add) and will deactivate it (delete).
>   How to run the scripts? thro crontab I fixed my crontab to 
>   0 3 * * * /path/
>   0 15 * * * /path/
>   Am i doing something wrong? is it a stupid thing?
>   The crontab runs at the schedualed times and I can see in /var/log/cron
>   /usr/sbin/cron[18525]: (root) CMD (/path/
>   But the ipfw will not be added! why? the email log says: ipfw: not found
>   why? is it a crontab mistake? shell script mistake? ipfw?
>   I tried many many other commands in the shell script such as mkdir,
>   rm-rf whatever.. all works, except this ipfw?
>   Any advise? Help? better ideas?
>   Thank you
> --
> Marwan Sultan

It would be useful to see the contents of the script.  Two things come
to mind:
1) Did you specificy the full path to ipfw in your script?
2) Just to be sure, is the cron job in root's crontab, or possibly a
regular users?

gpg --keyserver --recv-keys D8527E49
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list