LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-01-2007, 11:37 AM   #1
saeedos
LQ Newbie
 
Registered: Jun 2006
Posts: 1

Rep: Reputation: 0
squid help.


hi
i am worldskills compotitor in skills IT/pc and network support ,ask me in on of project that we want squid proxy server that allow users by username for using internet,50 hour per mount and all the limitation by username ? and if the user using the internet and the account will be over ,we want that disconnect from internet.(we can use every package from debian 4.0 etch) plz help me.
 
Old 07-01-2007, 11:52 PM   #2
Russell Griffiths
LQ Newbie
 
Registered: May 2006
Location: Sydney, Australia
Distribution: Red Hat 7.3
Posts: 27

Rep: Reputation: 15
saeedos, hi

Squid can manage the access by username, using an "access control list",
or an "acl" as it's usually called.

The access control lists can allow/deny access to the server by time of day. So if you say that any named user can get to the internet via the SQUID server from 0930-1200 on weekdays .. that's 2.5 hrs a day, Mon-Fri, 20 weekdays (max) per month. .. that's 50hrs/month.

If they try to log on out of those hours, they simply get 'Page not available".

But if you want an 'accumulated' 50 hours per month, used at 'any time', that's a bit more tricky, and you'll have to write a script to read statistics from the appropriate SQUID logfile. SQUID maintains 7 log files, and one of them is access.log, which records the times people do things, and how long they take.

The format of the file is timestamp,responsetime, client address, returncode, transfersize, method, uri,clientidentity, etc etc etc.

The fields that will be of interest to you are timestamp (when they asked SQUID for some data), responsetime (how long SQUID took to di it), and you may also be interested in transfersize (how many bytes were handled .. some servers limit you to 100 MB per month), and client identity (if that allows you to better keep track of who's who)

You'll need to write some perl (or other language if that suits you better) to read the logs every so often, and dump accumulated times per user into a file (database?), and when a trigger point is reached (50 hours of usage in your case), the username is inactivated in the acl.

The big 'but' , of course, is that 50 hours of 'activity' is a lot.

Each transaction typically takes milliseconds. SQUID is a 'service' that just remains 'available' until called by a user. They don't 'log on' for a certain period of time, and it seems to me that that is what you are trying to limit .. a total number of hours of 'availability'

In that case, its a simple date-and-time acl, my friend. See below about configuration with WebMin.

One usually administers SQUID either by directly editing the config files, or with WebMin (see www.webmin.com). The WebMinGuide by Joe Cooper (downloadable from the site) will tell you all about it, and what is available within SQUID configuration and setup.

SQUID's home page is www.squid-cache.org, and everything you need to know is either there, including some example scripts to interpret logfiles. or in the HOWTO's. There is another interesting utility available, called Squidalyzer, from Sourceforge.

the website bumf (http://squidalyser.sourceforge.net/) reads .... "Squidalyser is a squid traffic analyser, designed to allow per-user scrutiny and analysis of squid logfiles. The program runs from a Unix system via a web browser."

This product is a utility for manageing and monitoring user access to a SQUID server. But that's what your project is to do, and would be cheating, wouldn't it?

Also .. the book "Squid-the definitive guide" from O'Reill is the best book on SQUID there is. Also see the SQUID HOWTO at the Linux Documentation Project site -> ttp://tldp.org/HOWTO/TransparentProxy.html

Please let me know if this has been helpful

Grif
 
Old 03-04-2008, 04:41 PM   #3
ttkkdog
LQ Newbie
 
Registered: Jan 2008
Posts: 4

Rep: Reputation: 0
blocking Websites with squid

I have built a Suse 10.3 box running Webmin and Squid proxy. I want to be able to only alow certian web sites for my users to goto. Is there a way to configure this through webmin?
 
  


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
SQUID for blocking yahoo and msn [inc squid.conf] chrisfirestar Linux - Security 10 03-03-2008 08:33 AM
Squid: special configuration for remote Squid server hamish Linux - Software 0 12-06-2005 03:58 PM
squid message customization, hiding squid versioin rajnishmishra Linux - Networking 0 11-27-2004 03:55 AM
squid conf: squid failed when I type insert redirect_program /usr/bin/squidguard Niceman2005 Linux - Software 1 11-24-2004 02:29 PM
Squid load testing software / Squid optimisation? gundelgauk Linux - Networking 2 08-31-2004 07:36 PM

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

All times are GMT -5. The time now is 05:34 AM.

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