cron or ipfw problem!

Marwan Sultan Admin at
Fri Feb 20 12:33:38 PST 2004

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

More information about the freebsd-questions mailing list