ClearOS has the ability to turn off ALL access or to turn on access to the Internet at different times but if you need different content filters to function at different times, you will need to look elsewhere. Never fear, this howto exists.
Basically, you will set up the content filter how you want it for a specific time period. Start by making your content filter policy work the way you want it. Once you have all your profiles in place and your policies defined, we will back them up:
mkdir /root/support /root/support/contentfilter /root/support/contentfilter/policy1 yum -y install rsync rsync -av /etc/dansguardian-av/* /root/support/contentfilter/policy1/
Next, make your second policy the way you want it for your second timeslot:
mkdir /root/support/contentfilter/policy2 rsync -av /etc/dansguardian-av/* /root/support/contentfilter/policy2/
Then we create a script that activates the one configuration and another which activates the other. This simply entails making a copy of the one configuration to replace the /etc/dansguardian-av directory from the master and reloading the content filter service.
The script will look something like this:
#!/bin/bash /usr/bin/rsync -a /root/support/contentfilter/policy1/* /etc/dansguardian-av/ /sbin/service dansguardian-av reload
The other script will look like this:
#!/bin/bash /usr/bin/rsync -a /root/support/contentfilter/policy2/* /etc/dansguardian-av/ /sbin/service dansguardian-av reload
Now make these executable:
chmod +x /root/support/contentfilter/activatepolicy.sh
Try then out:
Once you are satisfied with how they work you merely need to make a schedule for how they operate. For example, let us say that your company needs to use policy1 between the hours of 8 and 5 every workday but afterhours and on weekends policy2 should run. We will need to edit the crontab to put that rule into effect. For this you need to know 'vi'.
Add these entries for the above scenario:
0 8 * * 1-5 /root/support/contentfilter/activatepolicy1.sh 0 17 * * * /root/support/contentfilter/activatepolicy2.sh