Search squid archive

[squid-users] Internet policy page - external_acl_type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I want an Internet policy web page to come up whenever a user tries to 
browse the web.  This is for anonymous access, no authentication.  Any 
ideas on what I'm doing wrong? What external_acl_type params and script 
might do the trick?

I followed the instructions posted earlier - http://www.squid-
cache.org/mail-archive/squid-users/200404/0793.html and have two 
problems.  First, it works once per IP but the "session" never seems to 
expire.  If you close browser and hours later access again you don't 
see the policy web page.  Second, they get the policy web page 
(deny_info) thrice.

Here's the squid.conf ...

     external_acl_type negative_ttl=3 %SRC /usr/local/scripts/squid-
session
     acl session external session
     http_access deny !session
     deny_info BANNER session
     http_access allow all

squid-session script is exactly as Henrik posted (thank you hno):

     #!/usr/bin/perl
     $|=1;
     my %logged_in;
 
     while(<>) {
       if (!defined($logged_in{$_})) {
         $logged_in{$_} = 1;
         print "ERR\n";
       } else {
         print "OK\n";
       }
     }

and /usr/local/squid/share/errors/English/BANNER
is a custom html page with javascript to reload original destination 
URL ala ...

     <p>
     <FORM METHOD="get" action="" NAME="Form1">
     <INPUT TYPE="button" VALUE="Continue" OnClick="location.reload()">
     </FORM>  

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux