Author Topic: How to Configure Filters with Time Period  (Read 2742 times)

tempus

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
How to Configure Filters with Time Period
« on: January 25, 2012, 01:55:42 pm »
I'm trying to set up blocks for periods of time, but I can not.
I watched the forum there are several related questions, but still with no clear answer.

I've tried to configure a variety of ways, with network objects, with authenticated users, but still does not work.

I wonder if anyone has any information about it, or simply the option is there but does not work.
If anyone has a working and able to take a photo and post I would like to know how to do this configuration.


Thank you and all information is welcome.


thiagotgc

  • Zen Warrior
  • ***
  • Posts: 129
  • Karma: +1/-0
    • View Profile
Re: How to Configure Filters with Time Period
« Reply #1 on: January 25, 2012, 05:05:30 pm »
Friend, I've tried several times and still can not succeed, every time I tried I could not make it work, I made the request here in the forum and no one helped me.

stuartiannaylor

  • Guest
Re: How to Configure Filters with Time Period
« Reply #2 on: January 25, 2012, 09:26:13 pm »
The only way would be to use cron jobs at the moment to run a custom script.

Have an off script and an on script run through cron.

I guess it wouldn't matter that updates and reboots would set the filter back on.

Stuart

This question has come up a few times and maybe you should be posting a feature request.


tempus

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: How to Configure Filters with Time Period
« Reply #3 on: January 26, 2012, 10:50:46 am »
Tks stuartiannaylor for the answer.

The current function already exists, but does not work.

What good is adding several features to some of them do not work as they should?

Run a script in cron is already beginning to leave the idea of facilitating the administration zentyal

Nobody uses this function?

Does anyone know where I could get to debug the script?

stuartiannaylor

  • Guest
Re: How to Configure Filters with Time Period
« Reply #4 on: January 26, 2012, 11:48:45 am »
I think it would be a good addition. One of my sites is a community centre and the filter for the evening youth club really needs to be different from when they are running adult education lessons.
Time based control would be perfect for that scenario.

It doesn't exist at the moment so I am sorry all I can say is script it and use cron for your time mechanism.

Stuart

tempus

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: How to Configure Filters with Time Period
« Reply #5 on: January 26, 2012, 12:42:36 pm »
Stuart,

Can you help me to do using cron? What I need to define templates and edit scripts using cron.

Tks for answer.

stuartiannaylor

  • Guest
Re: How to Configure Filters with Time Period
« Reply #6 on: January 26, 2012, 01:04:11 pm »
To be honest I am not all that great I this is one of my uses for webmin.

So install webmin but be carefull. Its cron utility is dead easy to use.

I keep meaning to ask for a cron interface in zentyal.

I will have a look at the scripts and see what I can do.

So basically you are going to set a filter and I am just going to turn it off and then back on again each day?

I will just see what the difference is between allow all and filter in the Zentyal settings then restart the proxy.

Might be tomoz.

stuartiannaylor

  • Guest
Re: How to Configure Filters with Time Period
« Reply #7 on: January 27, 2012, 12:58:26 pm »
Firstly I would like to make a disclaimer: Webmin use at your own peril.

Zentyal dev team there are some really good features in webmin that could provide much for admins.
The file manager & cron pages are excellent also many others like the disk management and I also like having database management all in one place.

I don't really like quoting webmin as Zentyal is sort of a replacement but it does have a few utilities that make it a good companion.

Its always good to search the forum first for any knowledge and if you did you would see an excellent thread on how to get webmin.
http://forum.zentyal.org/index.php/topic,9389.msg39044.html#msg39044

Follow the instructions there and remember to create a webmin service port 10000 and add that service to the firewall allow rules depending on your location to the server.

So from there https://myserverip:10000 and we should be able to logon as root with the admin password.
In the other section of webmin and choose the file-manager

However you set up the filtering on Zentyal is saved in /etc/dansguardian/dansguardianf1.conf

So I am going to set up a transparent proxy with my filtering set and save changes

Then in webmin I am going to copy dansguardianf1.conf and paste it as dansguardianf1.conf.filter

Then I am going to set up a transparent proxy that allows access without filtering and save changes

Then in webmin I am going to copy dansguardianf1.conf and paste it as dansguardianf1.conf.nofilter

Then webmin system scheduled cron jobs I am going to create a new cron job and run as root

cd /etc/dansguardian && cp dansguardianf1.conf.filter dansguardianf1.conf && /etc/init.d/zentyal squid restart

Set a time to filter and give it a description.

Then another cron job.

cd /etc/dansguardian && cp dansguardianf1.conf.nofilter dansguardianf1.conf && /etc/init.d/zentyal squid restart

Set a time to stop filtering and give it a description.

I think thats it but if the community would like to provide better methods then please do.
I haven't actually checked but I presume dansguardianf1.conf the filter list settings is all I need to change. Otherwise its the same procedure but do the same with /etc/dansguardian/dansguardian.conf

Stuart
« Last Edit: January 27, 2012, 01:02:25 pm by stuartiannaylor »