On Tue, 20 Apr 2004, Henk-Jan (squid) wrote:

> Here is my question: I want somehow to point my users every time (or once a
> day) that they access to internet to a company policy. (or disclaimer, tell
> them that some info me be logged etc etc)
>
> What would be the easyest concept to do that? Can I redirect everything once
> per session?
> (I hope you understand my question)



You need a little program which keeps track of the sessions. This silly
perl program should do:


#!/usr/bin/perl
$|=1;
my %logged_in;

while(<>) {
if (!defined($logged_in{$_})) {
$logged_in{$_} = 1;
print "ERR\n";
} else {
print "OK\n";
}
}

Then use this with the external_acl_type directive in squid.conf with a
very short negative ttl.. then use deny_info to have the user redirected
to the policy page if not matching this acl.


external_acl_type session ...
acl session external session

http_access deny !session
deny_info http://your.web.server/policy.html session

inserted before where you allow access.

Regards
Henrik