Squid Agent service for Linux

Source: Internet
Author: User

I. Squid INTRODUCTION

Proxy Server English full name is proxy server, its function is proxy network users to obtain network information. Squid is a software that caches Internet data, receives a user's download request, and automatically processes the downloaded data. When a user wants to download a homepage, they can send a request to squid to download it instead, then squid connects to the requested website and requests the homepage, and then passes the page to the user while keeping a backup, and when other users apply for the same page, squid The saved backups are immediately passed on to the user, making the user feel quite fast. Squid can proxy http, FTP, GOPHER, SSL and WAIS protocols and squid can be processed automatically, you can set the squid according to their own needs, so that they filter out the unwanted things.


Two. Installation Environment

1. The service machine needs to configure the dual network card

172.25.254.128 and 172.25.28.128 two network segments

2. Client Configuration single NIC

172.25.28.228 Network Segment

3. Install Squid Service and httpd service in the service machine


Three. Forward parsing

1. Install Squid service Yum install squid-y

Systemctl start Squid

Systemctl Stop Firewalld

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9E/89/wKioL1mS_A6AwndKAAAhj7cYSw0018.png "style=" float : none; "title=" screenshot from 2017-08-14 15-20-22.png "alt=" Wkiol1ms_a6awndkaaahj7cysw0018.png "/>


Netstat-antlpe | grep squid


View Squid Port



2. Edit the configuration file vim/etc/squid/squid.conf


Http_access allow everyone to access

Http_port 3128 Access Port 3128

Cache_dir UFS/VAR/SPOOL/SQUID 100 16 256 cache file directory, 16 file number, 256 size


650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/9E/89/wKioL1mS-IvQIpVCAADdno9fYlY533.png "title=" Screenshot from 2017-08-14 14-45-17.png "alt=" Wkiol1ms-ivqipvcaaddno9fyly533.png "/>

Systemctl Restart Squid


3. Testing

In the client browser:

Edit---->preferences---->advanced---->network---->settings

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/9E/9B/wKiom1mS-P_ilQqGAADh69Am3vo688.png "style=" float : none; "title=" screenshot from 2017-08-14 15-07-23.png "alt=" Wkiom1ms-p_ilqqgaadh69am3vo688.png "/>

Manuak Proxy Configurantion

Manually set up the agent on the client 172.25.28.228

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/9E/89/wKioL1mS-P_xhhZ3AAENh402KHw959.png "style=" float : none; "title=" screenshot from 2017-08-14 15-08-23.png "alt=" Wkiol1ms-p_xhhz3aaenh402khw959.png "/>


The client 172.25.28.228 is different from the 172.25.254.128 network segment, but the 172.25.28.128 (dual NIC) proxy can access the Web page to 172.25.254.128

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/9E/9B/wKiom1mS_A6Qn2zbAAEHjd3rIEE649.png "style=" float : none; "title=" screenshot from 2017-08-14 15-18-51.png "alt=" Wkiom1ms_a6qn2zbaaehjd3riee649.png "/>



Four. Reverse Proxy

Access to different IP from the same domain, easing access pressure


1. Edit the configuration file vim/etc/squid/squid.conf

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/9E/89/wKioL1mS_S3Bc5xeAAAtb9z0vmE523.png "title=" Screenshot from 2017-08-14 15-24-47.png "alt=" Wkiol1ms_s3bc5xeaaatb9z0vme523.png "/>

Cache points to 172.25.254.221, port 80


2. Turn off the agent on the client 172.25.28.228


650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/9E/9B/wKiom1mS_UvjTdwvAAEYjTYWvBM436.png "style=" float : none; "title=" screenshot from 2017-08-14 15-27-51.png "alt=" Wkiom1ms_uvjtdwvaaeyjtywvbm436.png "/>


3. Turn off the HTTPD service on the server (dual NIC)


4. Enter 172.25.28.128 on the server to access the Web page on 172.25.254.221, the server 172.25.28.128 look at the cache on 221

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/9E/89/wKioL1mS_UvwGVgOAABmWdDCTeo614.png "style=" float : none; "title=" screenshot from 2017-08-15 08-59-51.png "alt=" Wkiol1ms_uvwgvgoaabmwddcteo614.png "/>

Squid Agent service for Linux

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.