URL Filter with time based restrictions

Hi

Is there any way to setup the URL filter in UCS using time restrictions? I have installed squid + dansguardian.

The scenario is the following: In our company they need to restrict the users to access social domains like facebook, instagram, and youtube, but in lunch time from 12:00 noon to 2:00pm we can give free access. after this time period the restriction is applied again.

I was checking the manual and can configure the domain restrictions using the registry editor, but there isn’t any information on how to setup a time based restrictions.

Hope someone can help.

Thanks
plplazodor

Hey,

as far as I know DansGuardian doesn’t support using different settings based on the time of day. Squid itself does, but the initial connection from the web browser is made to DansGuardian, not Squid. DansGuardian only passes the request on to Squid if it isn’t filtered out. Therefore its restrictions will always apply no matter what time it is.

There are solutions out there that can do web filtering based on the time of day, but I’m pretty sure they use some handcrafted components to implement such a feature.

That being said you probably could achieve this with some manual fiddling:

[ul][li]Always allow the domains in question in DansGuardian[/li]
[li]Set up Squid ACLs for the different sections wrt. the time of day (see the Squid FAQ for examples)[/li]
[li]Set up Squid ACLs for the domains in question[/li]
[li]Set up Squid “http_access” rules that use the two ACL types in order to allow or deny the requests based on both the time of day and the destination domain[/li][/ul]

Place those instructions in “/etc/squid3/local_rules” where they won’t be overwritten by UCS’s templating mechanism. The rules listed in that file are processed before all the other rules are.

Kind regards,
mosu

Thanks Moritz,

When I get some free time I will certainly test your suggested procedure.

Rgds
plpazodor

Mastodon