SLES 15
Sponsored Link

Squid : Basic Authentication
2019/01/23
 
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 Authentication.
prox:~ #
vi /etc/squid/squid.conf
acl CONNECT method CONNECT
# line 26: add follows for Basic Auth

auth_param basic program /usr/sbin/basic_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" ("-c" is only for the initial regist)

prox:~ #
htpasswd2 -c /etc/squid/.htpasswd suse

New password:    
# set password

Re-type new password:
Adding password for user suse
prox:~ #
systemctl restart squid

Proxy Clients' Setting : SUSE
[3] Configure SUSE Proxy Client for Basic Authentication.
client:~ #
vi /etc/sysconfig/proxy
# line 11: change

PROXY_ENABLED="
yes
"
# line 19: specify HTTP proxy

HTTP_PROXY="
http://suse:password@prox.srv.world:3128/
"
# line 27: specify HTTPS proxy

HTTPS_PROXY="
http://suse:password@prox.srv.world:3128/
"
# line 34: specify FTP proxy

FTP_PROXY="
http://suse:password@prox.srv.world:3128/
"
Proxy Clients' Setting : 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.
Matched Content
 
Tweet