LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-24-2011, 12:03 AM   #1
aniammu
LQ Newbie
 
Registered: May 2011
Posts: 10

Rep: Reputation: 0
How to unblock the sites for a particular period of time through proxy?


hello

We are using Red Hat linux 4 .We blocked certain sites through squid for certain ip address.we want to unblock these sites in particular interval ,ie during noon time and after 4.00 pm.
Here we have given
acl our_networks src 192.168.1.0/24 192.168.2.0/24
acl blocked_sites url_regex –i ‘/etc/squid/sites.txt’
http_access deny blocked_sites
http_access allow our_networks

In the sites.txt we have given the names the of those sites that should be blocked
The problem is to unblock sites in sites.txt , for particular intervals

Last edited by aniammu; 05-24-2011 at 12:05 AM.
 
Old 05-24-2011, 12:51 AM   #2
tsg
Member
 
Registered: Mar 2008
Posts: 155

Rep: Reputation: 30
use a time acl in the format:
Code:
acl aclname time [day-abbrevs] [h1:m1-h2:m2]
	  # [fast]
	  #  day-abbrevs:
	  #	S - Sunday
	  #	M - Monday
	  #	T - Tuesday
	  #	W - Wednesday
	  #	H - Thursday
	  #	F - Friday
	  #	A - Saturday
	  #  h1:m1 must be less than h2:m2
for instance:

acl our_networks src 192.168.1.0/24 192.168.2.0/24
acl lunchtime time MTWHF 12:00-13:00
acl blocked_sites url_regex –i ‘/etc/squid/sites.txt’
http_access allow lunchtime blocked_sites
http_access deny blocked_sites
http_access allow our_networks

Last edited by tsg; 05-24-2011 at 01:08 AM. Reason: corrected syntax
 
Old 05-24-2011, 02:19 AM   #3
aniammu
LQ Newbie
 
Registered: May 2011
Posts: 10

Original Poster
Rep: Reputation: 0
Thank you very much sir,it works.
 
Old 05-24-2011, 08:34 AM   #4
tsg
Member
 
Registered: Mar 2008
Posts: 155

Rep: Reputation: 30
If that worked, please mark the thread solved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unblock the sites getviswa Linux - Server 2 06-18-2010 09:08 AM
Proxy software to unblock internet access on Linux vasim98 Linux - Software 1 12-30-2009 09:10 AM
FC5 slows down after period of time asidarin Linux - Server 19 06-25-2007 10:46 AM
Long period of time to install Peter_APIIT Fedora 4 03-25-2007 12:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration