7
Securing Squid (Proxy) Using Digest Authentication

Securing Squid (Proxy) Using Digest Authentication

Embed Size (px)

Citation preview

Page 1: Securing Squid (Proxy) Using Digest Authentication

Securing Squid (Proxy)Using Digest Authentication

Page 2: Securing Squid (Proxy) Using Digest Authentication

Authenticasi Method in Squid• The user credentials can be passed from the web browser to the proxy in

several ways. These methods are called authentication schemes.Squid supports the following schemes:

– basic. This is the oldest and most insecure scheme. User name and password are transferred in clear text and can be read by anyone who can access the transferred data. You need to be aware of this and decide if this is acceptable in your environment.

– digest. This a better, more secure authentication scheme. Instead of passing the password in clear text, this scheme uses a hash based on the password and several other parameters.

– NTLM. NTLM is a protocol that is used in several Microsoft network implementations to enable single sign-on across different services. Squid supports NTLM for proxy authentication, although it is not an official HTTP extension.

Page 3: Securing Squid (Proxy) Using Digest Authentication

Recommendation• Usually digest is the best choice, because it is a

standardized and rather secure authentication scheme. However, the current Squid versions (2.5.x) require the passwords to be available in clear text on the system running the proxy in order to create the correct digest hash. This makes it difficult to integrate Squid into an existing authentication environment where passwords are usually only stored as a hash of the actual password. Future versions of the Squid package (starting with version 3.0) will most likely support encrypted passwords for the digest authentication scheme.

Page 4: Securing Squid (Proxy) Using Digest Authentication

Installation

• # apt-get install squid apache2• # vim /etc/squid/squid.conf

find a string “INSERT INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS”

Page 5: Securing Squid (Proxy) Using Digest Authentication

Insert A Code• Code in after the “INSERT….

auth_param digest program /usr/lib/squid/digest_pw_auth -c /etc/squid/passwordauth_param digest children 2000auth_param digest realm pensauth_param digest nonce_garbage_interval 5 minutesauth_param digest nonce_max_duration 30 minutesauth_param digest nonce_max_count 50auth_param digest post_workaround off

acl password proxy_auth REQUIREDacl jarkom src 10.252.108.0/255.255.255.0http_access allow jarkom password

Page 6: Securing Squid (Proxy) Using Digest Authentication

Creating password & Restarting Daemon

• # htdigest -c /etc/squid/password pens idris(entry your password)

• # /etc/init.d/squid restart

Page 7: Securing Squid (Proxy) Using Digest Authentication

Testing

• Open your browser and set your proxy server as localhost on port 3128

• Access a website