Laurent RAYSSIGUIER wrote:
Hello,
I would like to setup a SQUID proxy with radius auth. Is there someone who do that ?
second question, if it's possible... how to setup a failover if the first freeradius autentication server fails ?
Thank you for every help
Laurent
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
#!/usr/bin/perl #----------------------------------------------------------------------------------- # Author: Edmar Lourenco Borges; # Authenticator Squid/Radius; # Use perl modules perl RadiusPerl-0.05/MD5-1.7/IO-1.20 # Theses modules can be found in http://core.ring.gr.jp/archives/lang/perl/CPAN/modules #----------------------------------------------------------------------------------- $|=1; BEGIN {;} END {print "ERR" unless $GLOBAL{loaded};} #------------------------------------------------------------------------------ #Definition of globals variables: #Radius Server: $Global{hostname} = "" or "ip address[:port]" #Simetric Key: $Global{key} = "string" #------------------------------------------------------------------------------ $GLOBAL{loaded} = 0; $GLOBAL{hostname} = "localhost:1812"; $GLOBAL{key} = "testing123";
main(); sub main { authentication(); } # end of main sub authentication { local(@info,$radius); # use Authen::Radius; use Radius; $GLOBAL{loaded} = 1; while (<STDIN>) { chop($_); @info = split(/ / , $_); $radius = new Authen::Radius(Host => $GLOBAL{hostname}, Secret => $GLOBAL{key}); print $radius->check_pwd(@info[0], @info[1]) ? "OK\n" : "ERR\n"; } } # end authentication