LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   squid! external_acl_type problem (http://www.linuxquestions.org/questions/linux-server-73/squid-external_acl_type-problem-697229/)

haxpak 01-14-2009 08:16 AM

squid! external_acl_type problem
 
please help anyone!!

i want to authenticate my clients

i am storing all authenticated IP's in a file - one per line

authentication is done by using a cgi script
"this is actually a part of my project wherein authentication will be using a database"

now i am using external_acl type

squid.conf file looks like this:

Code:

external_acl_type VERIFIED children=1 %SRC /home/project/ip_validate
acl haxpak external VERIFIED               
http_access allow haxpak

and the validation script is :
Code:

#! /usr/bin/perl

$ip_addr = <STDIN>;
#chop ($ip_addr);
open (INFIL , "/home/project/ip_valid");

$in_ip = <INFIL>;
$valid = 0;
while ($in_ip ne "")
        {
        if ($in_ip eq $ip_addr)
                {
                $valid = 1;
                break;
                }
        $in_ip = <INFIL>;
        }

if ($valid == 1)
        {
        print ("OK");
        }

else
        {
        print ("ERR");
        }

i am not able to undestand as to why am i not able to access internat from my clients

otherwise if i remove all this and use default config i am having no problem

Please help me!!!!

i am stuck for last 4 days

Thanks in advance

TB0ne 01-14-2009 09:07 AM

Quote:

Originally Posted by haxpak (Post 3408239)
please help anyone!!

i want to authenticate my clients

i am storing all authenticated IP's in a file - one per line

authentication is done by using a cgi script
"this is actually a part of my project wherein authentication will be using a database"

now i am using external_acl type

squid.conf file looks like this:

i am not able to undestand as to why am i not able to access internat from my clients

otherwise if i remove all this and use default config i am having no problem

Try this page:
http://www.devet.org/squid/proxy_auth/

You don't say anything about what version or distro of Linux you're using, what version of Squid, or anything about your environment.

haxpak 01-14-2009 09:53 AM

i am using squid stable-3 and op sys is fc-9 x86_64

TB0ne 01-14-2009 10:00 AM

Quote:

Originally Posted by haxpak (Post 3408359)
i am using squid stable-3 and op sys is fc-9 x86_64

Ok...did you check the page that was referenced, and look at the examples provided there?????

haxpak 01-14-2009 10:13 AM

yes but they provide help only with authentication helpers such as ncsa_auth

there is no refrence to external_acl_type

and now i just checked that as required by squid my perl script is returning OK to stdout

in the http_access tag

i have given

acl haxpak external VERIFIED
http_access allow haxpak

do i need to specify that the source ip of VERIFIED should be allowed
if yes how do i do it?


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