How To Make Squid-Password Authentication
By admin on Apr 15, 2008 in Linux Think, Network, featured, squid
after getting a hacked proxy server and manage it into a round-robin server. so this one is how to make an authentication on your “server”
. since i’m a good man, hohoho.. i allow all the network at my campus so all my friends can use it. and of course with little warn that the proxy only for browsing not download.ok this is the step. i’ll assume that you already have a well run squid. we’ll make an authentication using ncsa_auth.
ncsa_auth - NCSA httpd-style password file authentication helper for Squid
ncsa_auth allows Squid to read and authenticate user and password information from an NCSA/Apache httpd-style password file when using basic HTTP authentication.The only parameter is the password file. It must have permissions to be read by the user that Squid is running as (cache_effective_user in squid.conf).This password file can be manipulated using htpasswd.
this is the step :
- make the password file ex:squid_passwd
[root@paKTua]# touch /etc/squid/squid_passwd
[root@paKTua]# chmod o+r /etc/squid/squid_passwd
- add your user password at squid_passwd ex:paktua
[root@paKTua]# htpasswd /etc/squid/squid_passwd paktua
New password:
Re-type new password:
Adding password for user paktua
- find the ncsa_auth path,we’ll use this later
[root@paKTua]# locate ncsa_auth
/usr/lib/squid/ncsa_auth
- add this several command at squid.conf
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/squid_passwd
auth_param basic realm paKTua PRoxy Server, enter your username and password
acl ncsa_users proxy_auth REQUIRED
http_access allow ncsa_users
and you done. just restart your squid. that all ![]()

