SQUID PROXY SERVER CONFIG FILE:
sample /etc/squid3/squid.conf :
-------------------------------
auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/passwd
auth_param basic children 5
auth_param basic realm Squid proxy with NCSA
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
acl usrs proxy_auth REQUIRED
http_access allow usrs
http_access deny all
http_port 3128
> Before starting the Squid server we need to create a password file by using NCSA for that we need
apache2-utils (ubuntu)
> for the first time creating the passwd we need to use -c option for htpasswd command , for next don't use -c
$ /usr/bin/htpasswd -c /etc/squid3/passwd somexyz
New password:
Re-type new password:
Adding password for user somexyz
sample /etc/squid3/squid.conf :
-------------------------------
auth_param basic program /usr/lib/squid3/ncsa_auth /etc/squid3/passwd
auth_param basic children 5
auth_param basic realm Squid proxy with NCSA
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
acl usrs proxy_auth REQUIRED
http_access allow usrs
http_access deny all
http_port 3128
> Before starting the Squid server we need to create a password file by using NCSA for that we need
apache2-utils (ubuntu)
> for the first time creating the passwd we need to use -c option for htpasswd command , for next don't use -c
$ /usr/bin/htpasswd -c /etc/squid3/passwd somexyz
New password:
Re-type new password:
Adding password for user somexyz
>Now start squid server :
$ service squid3 start
> Squid proxy will start but we not able log in, because the password file storing in the format md5, but Squid 3 uses Crypt format password.
> To uses Crypt format password user we need to use "-d" for more details "/usr/bin/htpasswd --help"
$ /usr/bin/htpasswd -d /etc/squid3/passwd somexyz1
New password:
Re-type new password:
Adding password for user somexyz
> Now restart the Squid service
$ service squid3 stop
$ service squid3 start
> Now we can login with somexyz1 user account into squid proxy : - )
Re-type new password:
Adding password for user somexyz
> Now restart the Squid service
$ service squid3 stop
$ service squid3 start
> Now we can login with somexyz1 user account into squid proxy : - )
0 comments:
Post a Comment