티스토리 뷰

OpenSUSE 11 Proxy Server Basic Authentication


Basic Authentication

 

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

prox:~ # /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/"


저작자 표시 비영리 변경 금지
신고
댓글