My server is running 10.5. I use some various scripts to automatically add firewall rules. All the rules get added to ruleset 17.
So on the flip side, every night, I had a launchd that would delete set 17, resetting all of these temporary firewall rules. This worked great for over a year.
Then after a weird crash, launchd started acting weird. My server is offsite, so I just took the easy solution and replaced all of my launchdeamons with crons. I have lots of scripts that run at various times, doing things like updating site content, creating backups, and so on. So they all run, but I can’t get the firewall to reset.
So the way the old launchd was setup, was that I had my own bash script wrapper which contained the following command only:
ipfw delete set 17;
But for some reason, with CRON (the cron is owned by root), my script wouldn’t actually delete the ruleset.
Then I changed the cron so it was actually running the command directly “ipfw delete set 17”, but it still won’t work.
I also added a ‘touch’ command after the delete set command, so I can clearly see that this cron is running every night at the proper time. But for some reason, it’s doing nothing.
This really is causing some problems on my server, any ideas what’s going on?