LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 12-12-2007, 12:51 AM   #1
espiya7
Member
 
Registered: Jul 2007
Posts: 33

Rep: Reputation: 15
Timed access to squid


Gud afternoon guys! I just installed squid and I've been doin' a lot of experiments on it lately coz I find it really interesting. However, I stumble upon a really cool feature, that is, squid's timed access to users. I am assigned to maintain the proxy server that is setup here in our school and I think, this feature would really help.

The problem is I tried using this code, hoping it would deny connections to the sites inside "timed_sites.txt" from mon-sat 8:30-12:00 and mon-fr 13:30-17:00....

acl timed_sites url_regex "/etc/squid/timed_sites.txt"
acl office_hours_am time MTWHFS 8:30-12:00
acl office_hours_pm time MTWHF 13:30-17:00

http_access deny timed_sites office_hours_am
http_access deny timed_sites office_hours_pm


but it doesn't work...
 
Old 12-12-2007, 06:02 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
The syntax of your acl and http_access statements is the same as I'm using on a box here - so that shouldn't be the problem. Have you checked the location and format of /etc/squid/timed_sites.txt? The sites should be listed one per line.

Also, the order of the http_access statements is important. Do you have any statements prior to those in your squid.conf file that could already have allowed access?
 
Old 12-21-2007, 07:57 PM   #3
espiya7
Member
 
Registered: Jul 2007
Posts: 33

Original Poster
Rep: Reputation: 15
my squid rules worked when i used this line

acl timed_sites url_regex "/squid/etc/timed_sites.txt"
acl office_hours time M T W H F S 8:30-12:00 1:30-5:00

http_access deny office_hours timed_sites


however, when i changed the rules so that users will be allowed to access the sites on Saturday afternoon. I used this code:

acl office_hours_am time M T W H F S 8:30-12:00
acl office_hours_pm time M T W H F 13:30-5:00

http_access deny timed_sites office_hours_am
http_access deny timed_sites office_hours_pm

and then did /squid/sbin/squid -k reconfigure

but squid allowed access to timed_sites. Could this be a bug on the side of squid? Btw, these lines were placed on top of other http_access lines so that it would be evaluated first.

Last edited by espiya7; 12-21-2007 at 07:59 PM.
 
Old 12-21-2007, 08:00 PM   #4
espiya7
Member
 
Registered: Jul 2007
Posts: 33

Original Poster
Rep: Reputation: 15
follow-up msg:

I placed the original code back:

acl timed_sites url_regex "/squid/etc/timed_sites.txt"
acl office_hours time M T W H F S 8:30-12:00 1:30-5:00

http_access deny office_hours timed_sites


but still the same thing happened, it still allowed access to timed_sites.
 
Old 12-22-2007, 05:35 AM   #5
prasanta
Member
 
Registered: Mar 2005
Location: India
Distribution: Debian
Posts: 368

Rep: Reputation: 37
Quote:
Originally Posted by espiya7
however, when i changed the rules so that users will be allowed to access the sites on Saturday afternoon. I used this code:
Saturday should have been 'A' instead of 'S'.

--
Prasanta
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
sendmail - Connection timed out [dsn=4.0.0 stat=Deferred: Connection timed out] ananthak Linux - Software 0 04-24-2007 07:28 AM
Timed based access restrictions with squid & danguardian keithdj Fedora 3 04-19-2006 10:27 AM
Squid access.log to MS Access mephitic Linux - Software 0 10-30-2004 04:45 PM
SuseFirewall2 and external SSH access connection timed out usmanaziz Linux - Distributions 1 09-03-2004 03:15 AM
user account timed access wylie eyed Linux - General 4 01-12-2004 05:54 PM


All times are GMT -5. The time now is 03:29 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration