Zentyal Forum, Linux Small Business Server
Zentyal Server => Installation and Upgrades => Topic started by: madhacker on January 24, 2011, 01:11:47 pm
-
Hi
Could someone please help me, I downloaded the latest version of Zentyal and have it running on my server in the office.
But what i would like to know if anyone could take through it step by step on how to block site between a time period"
At the monent i have the proxy in transparent mode, i dont know if thats could be an issue.
??? ??? ???
So if anyone could be so kind as to help me with is .
Regards
Brad
-
Hi,
I have exactly the same problem. I have to configure two different set of proxy restrictions depending on the time.
Could someone give us a clue?
Thanks :)
-
I'm not sure these are exactly the same problem. If I'm following right, there's one case where at least some sites have to be blocked for some Object during a specified period of time, and one case where two filters profiles have to be available to some Object at different times of the day. I'm not sure the latter case can be done from the Zentyal GUI.
Maybe I'm misunderstanding, though ...
-
I'm not sure these are exactly the same problem. If I'm following right, there's one case where at least some sites have to be blocked for some Object during a specified period of time, and one case where two filters profiles have to be available to some Object at different times of the day. I'm not sure the latter case can be done from the Zentyal GUI.
Maybe I'm misunderstanding, though ...
I think both cases can be resolved with cron tasks, replacing some configuration files and restarting the service, but I would like to know which files to replace without breaking zentyal, as afaik, zentyal has its own configuration files that overwrites the os configuration.
Thank you! :)
-
I think the OP's case can be done using stock Zentyal features, though it may depend on what's being blocked. Cases requiring slicing up 24 hours into more than two pieces look (to me) problematic.
Zentyal overwrites the configuration for only those services it manages, if I understand it right. Unmanaged services can run side-by-side with Zentyal and not be disturbed. If you come up with a solution, I'm guessing others in the community would benefit from knowing how you made it work. :)
-
I tried it with backups:
- Configured the proxy in a restrictive way
- Got a configuration backup (system->backups->configuration)
- Configured the proxy "open"
- Got another configuration backup
- Then, I programmed two cron jobs:
/etc/init.d/ebox stop && /usr/share/ebox/ebox-restore-backup restrictive.tar && /etc/init.d/ebox start
/etc/init.d/ebox stop && /usr/share/ebox/ebox-restore-backup open.tar && /etc/init.d/ebox start
It simply wont work, some ideas???
-
Can't you both define windows during which you want access to be authorized (because default is "deny") ???
-
I got it!!!!!!!!
Finally I found the solution:
- Configure your first ruleset and save changes
- Execute /usr/share/zentyal/make-backup
- Move the file created to, by example, /home/youruser/first.tar
- Configure your second ruleset and save changes again
- Execute /usr/share/zentyal/make-backup
- Move the file created to /home/youruser/second.tar
- Open your /etc/crontab and add these two tasks:
10 10 * * * root /usr/share/zentyal/restore-backup /home/youruser/first.tar && /usr/share/zentyal/global-action --action saveAllModules
20 20 * * * root /usr/share/zentyal/restore-backup /home/youruser/first.tar && /usr/share/zentyal/global-action --action saveAllModules
restart cron
And you're done! :)