Setting up Mandatory Authentication for Internet Access


To setup authentication, first we need to download the package apache2 (Debian). First, we need to create a file that would contain the username and passwords of users who are allowed access.

Step 1:
#apt-get install apache2

Step 2:
#vim /etc/squid/password_file

Now, the file ownership must be changed as owner: root and group: proxy

#chown root:proxy /etc/squid/password_file
#chmod 640 /etc/squid/password_file
 

Step 3 :
Create the users:

#htpasswd /etc/squid/passwd username
 
Step 4: 
#/etc/squid/squid.conf

 acl localhost src 127.0.0.1/32

acl to_localhost dst 127.0.0.0/8

acl bol_network src 192.168.200.0/24

acl login proxy_auth REQUIRED   ### Edit This line

 http_access allow bol_network login      ### Edit This line

http_access deny all

 
edit: 

auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd


 
The following lines should be in the file. It is likely that no change would be required

 auth_param basic children 5

auth_param basic credentialsttl 2 hours

auth_param basic casesensitive off


Step 5:
Restart Squid Service

Comments

Popular posts from this blog

Squid Configuration

Squint Configure

Postfix SASL authentication with SMTP port 465:

How to Change the Logo from Zimbra Admin Console