Koozali.org: home of the SME Server

Limiting access to Facebook/Youtube in time periods

Offline johnt

  • 2
  • +0/-0
Limiting access to Facebook/Youtube in time periods
« on: August 16, 2015, 12:26:50 PM »
Comrades,
I need to limit access to facebook/youtube in certain times during week days, and deny access for the rest of the times.
Example - access allowed during 12 midday to 2 pm daily, denied for the rest of day.

Currently using SME Server v9 and the built-in Squid proxy.
Thanks in advance.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Limiting access to Facebook/Youtube in time periods
« Reply #1 on: August 17, 2015, 04:18:05 PM »
johnt

You can create a domain in server manager Domain panel, eg facebook.com which resolves using the local DNS option (rather than Internet DNS servers) & points at your servers main (local) web site, so if users try to access facebook.com they get your main website.
You can create a cron job to issue a db command that will configure the "redirected" domain(s), & schedule that for 2pm.
You can create another cron job to issue another db command that deletes the redirected domain(s), & schedule that for 12 midday.

To get the appropriate command, create a domain in the Domains panel in server mananger, & then review the messages log file.

I do something similar in Dansguardian & it works fine.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Limiting access to Facebook/Youtube in time periods
« Reply #2 on: August 17, 2015, 04:22:31 PM »

Offline johnt

  • 2
  • +0/-0
Re: Limiting access to Facebook/Youtube in time periods
« Reply #3 on: August 20, 2015, 10:08:36 AM »
Thanks comrades.
Trying the mentioned solutions this weekend and will come back with results.

Cheers
John.