Set Squid user authentication Access Control in Linux

Source: Internet
Author: User
Article Title: Linux sets Squid's user authentication access control. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Kernel: Linux 2.2
Squid version: Squid-2.3.stable2
Http://www.squid-cache.org/Versions/v2/2.3/squid-2.3.STABLE2-src.tar.gz)
Release: Redhat Linux 6.0
  
1. Download, compile, and install Squid
Note: Run squid as nobody and root cannot be used.
  
Assume that the squid home directory is/usr/local/squid/
Assume that the squid source directory is in the/tmp/squid-2.3.STABLE2
  
2 .. # cd/tmp/squid-2.3.STABLE2/auth_modules/NCSA
# Make ncsa_auth
  
3. Copy the generated execution file ncsa_auth to the squid execution file directory.
# Cp ncsa_auth/usr/local/squid/bin
  
4. Obtain the program htpasswd from the Apache Software Package.
  
5. Use htpasswd to generate the user name and password used by Squid to authenticate the database file
  
# Htpasswd-c/usr/local/squid/etc/passwd
  
6. Add more users
# Htpasswd/usr/loal/squid/etc/passwd
  
7. Modify squid. conf and enable ncsa_auth user authentication.
[Root @ linux etc] # more squid. conf | grep ncsa_auth
Authenticate_program/usr/local/squid/bin/ncsa_auth/usr/local/squid/etc/passwd
  
8. Modify the ACL, as shown below:
[Root @ linux etc] # more squid. conf | grep jephe
Acl isd proxy_auth jephe bob jicon
Http_access allow isd

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.