G'Day all.

First of all thanks to everyone involved with the leaf project, it is a great 
distro :)

Now I am having a problem with trying to restart shorewall under cron to 
change the firewall rules. Here in AU, most ISP's have limits on how much 
data we can download each month, but one of my ISP's has peak and offpeak 
periods.
In the offpeak periods I have unlimited traffic. Since I share my connections 
with my house mates, and one of them is a heavy kazza user, I am trying to 
set up alternate shorewall configs that run under cron so that during peak 
periods kazza is blocked, and offpeak it is allowed.
I have been trying now for a few weeks but I can't make shorewall change 
rules correctly. 

In /etc/crontab I have tried
0  2    * * 1   root    /sbin/shorewall/offpeak restart
0  8    * * 1   root    /sbin/shorewall/peak restart
0  2    * * 2   root    /sbin/shorewall/offpeak restart
0  8    * * 2   root    /sbin/shorewall/peak restart
etc...

the only file in the peak and offpeak directories are a different rules file.

Shorewall is restarted at the correct times, but the new config doesn't seem 
to work. I am unable to communicate through the firewall.
But if I issue the restart command from the command line everything works 
fine.
When restarted from cron I can see shorewall waiting for the lock file to be 
removed. I have tried removing the lockfile before restarting shorewall, but 
this didn't help. This weekend I upgraded to shorewall 1.3.7b.
Now shorewall will remove the lockfile itself, but I am wondering if this is 
the cause of my problems ?
I can't understand why when restarting shorewall from cron, shorewall always 
has to wait for the mutex timeout before continuing. Is shorewall just not 
running correct when called from cron ?

My actual configuration is a bit more complicated than this, as I have both 
adsl and cable connections into the bering box.
I actually run the shorewall restart commands in a wrapper script. called by 
cron that also changes the default gateway from one account to the other, but 
the result is the same as trying to restart shorewall direct from cron as 
described above.
Running this wraper script from the command line everything is fine,
Shorewall doesn't wait for the mutex timeout ( unless shorewall was last 
restarted from cron) and the changeover works 100%.

Does anyone have any ideas on what might be happening ? or on what other 
things I need to look at ?
I am still quite new to linux, so please forgive me if I havn't provided 
enough info.

Thanks in advance.

Mick.


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