Basic Authentication2015/12/03 |
Set Basic Authentication and limit squid for users to require authentication.
|
|
[1] | Install a package which includes htpasswd. |
prox:~ # zypper -n install apache2-utils
|
[2] | Configure Squid to set Basic Auth. |
prox:~ #
vi /etc/squid/squid.conf
acl CONNECT method CONNECT
# line 30: add follows for Basic Auth
auth_param basic program /usr/sbin/ncsa_auth /etc/squid/.htpasswd
auth_param basic children 5 auth_param basic realm Squid Basic Authentication auth_param basic credentialsttl 5 hours acl password proxy_auth REQUIRED http_access allow password # add a user : create a new file with "-c" ( add the "-c" option only for the initial registration ) prox:~ # htpasswd2 -c /etc/squid/.htpasswd suse New password: # set password Re-type new password: Adding password for user suse /etc/init.d/squid restart |
Proxy Clients' Settings : SUSE
|
[3] | Configure SUSE Proxy Client for Basic Auth. |
client:~ #
vi /etc/sysconfig/proxy # line 11: change PROXY_ENABLED=" yes "
# line 21: set HTTP proxy HTTP_PROXY=" http://suse:password@prox.srv.world:3128/ "
# line 30: set HTTPS proxy HTTPS_PROXY=" http://suse:password@prox.srv.world:3128/ "
# line 37: set FTP proxy FTP_PROXY=" http://suse:password@prox.srv.world:3128/ "
|
Proxy Clients' Settings : Windows
|
[4] | For Windows Clients, none of specific settings, but when access to a web, proxy server requires authentication like follows, then input username and password. |
Sponsored Link |