Date: Fri, 20 Feb 2004 23:33:45 +0300 From: "Marwan Sultan" <Admin@kifco.net> To: "FreeBSD questions List" <freebsd-questions@freebsd.org> Subject: cron or ipfw problem! Message-ID: <20040220201619.M35470@kifco.net>
next in thread | raw e-mail | index | archive | help
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 192.168.1.21 to any So I created a shell script lets say deny.sh says the above rule and I chmod +x the script. Second shell script lets say enable.sh 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/deny.sh 0 15 * * * /path/enable.sh 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/deny.sh) 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040220201619.M35470>