CENTOS7 Configuration Agent Squid

Source: Internet
Author: User
Tags openssl openssl rsa openssl x509 squid proxy

It's been a long time coming, recently spent a week to the company configured a squid agent, because the first contact with the CentOS system, see black Background white, on a head of the circle, in the past thousand difficult million resistance, finally is configured successfully, and has been promoted use.

1. Install Squid:

installation command: Yum install squid
After installation check: RPM-QA | grep squid

If successful installation will prompt:


2. Install Apache, command: Yum install httpd

Add user, Command: htpasswd-c/etc/squid/passwd user


3. Create an encrypted squid proxy channel

OpenSSL req-new > TANK.CSR
OpenSSL rsa-in privkey.pem-out Tank.key
OpenSSL x509-in squid.csr-out squid.crt-req-signkey squid.key-days 3650


4. Configure squid, plays, there are a lot of information on the Internet, but in fact, the command to use only 1 lines, yes, is 1 lines.

Https_port 443 CERT=/ETC/SQUID/TANK.CRT Key=/etc/squid/tank.key

Now you can start up, that is, no validation, next is validation.


5. Add the account password to the configuration file:

Auth_param Basic PROGRAM/USR/LIB64/SQUID/BASIC_NCSA_AUTH/ETC/SQUID/PASSWD
Auth_param Basic Children 5
Auth_param Basic Credentialsttl 8 hours
Auth_param Basic Realm my test prosy
ACL test123 Proxy_auth REQUIRED
http_access Allow user
Http_access Deny All


6. Done, start.

Command: Service squid start

7. View Status: Service Squid status


Another reminder of a big pit, but also let me tangle 2 days a big pit ... Remember to close the firewall ....


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.