Install Squid Proxy server for Linux installation

Source: Internet
Author: User
Tags squid proxy

Install squid proxy server for Linux installation

1. Case topology Diagram

system centos6.5 Software sarg-2.3.7.tar.gz squid-3.4.6.tar.gz

650) this.width=650; "style=" Float:none; "title=" Picture 1.png "src=" https://s2.51cto.com/wyfs02/M02/9A/46/ Wkiom1ltlvqs3zkpaaazzye7kyo804.png "alt=" Wkiom1ltlvqs3zkpaaazzye7kyo804.png "/>

2. Case Requirements

(1) If you need to configure the network, internal Linux needs to configure the default gateway, external Linux does not need to configure the default gateway, turn on routing forwarding on the squid server.

650) this.width=650; "style=" Float:none; "title=" Picture 2.png "src=" https://s2.51cto.com/wyfs02/M02/9A/47/ Wkiol1ltlvvhfivvaai1idodkxs962.png "alt=" Wkiol1ltlvvhfivvaai1idodkxs962.png "/>

(2) install squidon the squid server,and do the related configuration, start the squid service, check the port.

650) this.width=650; "style=" Float:none; "title=" Picture 3.png "src=" https://s3.51cto.com/wyfs02/M01/9A/47/ Wkiol1ltlvyze9plaal1b2cwr3w852.png "alt=" Wkiol1ltlvyze9plaal1b2cwr3w852.png "/>

650) this.width=650; "style=" Float:none; "title=" Picture 4.png "src=" https://s2.51cto.com/wyfs02/M02/9A/46/ Wkiom1ltlv3ykq1maaenrmclh4e550.png "alt=" Wkiom1ltlv3ykq1maaenrmclh4e550.png "/>

650) this.width=650; "style=" Float:none; "title=" Picture 5.png "src=" https://s2.51cto.com/wyfs02/M02/9A/47/ Wkiol1ltlv7xfeo1aai_xoj2dz0716.png "alt=" Wkiol1ltlv7xfeo1aai_xoj2dz0716.png "/>

(3) Building a traditional proxy server requires that the internal Linux Server be able to access the external Web server using a traditional proxy . The maximum allowed files for internal clients to be downloaded cannot exceed 10MB, andsquid 's maximum cache file is 4MB. Internal client validation file download.

650) this.width=650; "style=" Float:none; "title=" Picture 6.png "src=" https://s3.51cto.com/wyfs02/M00/9A/46/ Wkiom1ltlv6rfzqjaagbbw2y23s258.png "alt=" Wkiom1ltlv6rfzqjaagbbw2y23s258.png "/>

Vim/etc/squid.conf

650) this.width=650; "style=" Float:none; "title=" Picture 7.png "src=" https://s4.51cto.com/wyfs02/M00/9A/46/ Wkiom1ltlv-tz3g9aaemoyt3srw998.png "alt=" Wkiom1ltlv-tz3g9aaemoyt3srw998.png "/>

Verify:

650) this.width=650; "style=" Float:none; "title=" Picture 8.png "src=" Https://s4.51cto.com/wyfs02/M00/9A/47/wKioL1lTlV-QJ _yyaafwnk-yp2q699.png "alt=" Wkiol1ltlv-qj_yyaafwnk-yp2q699.png "/>

Note the firewall iptables, CONFIGURED as:service iptables stop. If not configured, the error is as follows:

650) this.width=650; "style=" Float:none; "title=" Picture 9.png "src=" https://s4.51cto.com/wyfs02/M00/9A/47/ Wkiol1ltlwdwrwroaad1asuhi2c115.png "alt=" Wkiol1ltlwdwrwroaad1asuhi2c115.png "/>

Download Verification:200.0.0.10/a 200.0.0.10/b

(4) Modify The main profile of squid , set up a transparent proxy server, combined with iptables redirection strategy. Verify that internal clients can use transparent proxies to access external Web servers.

650) this.width=650; "style=" Float:none; "title=" Picture 10.png "src=" https://s4.51cto.com/wyfs02/M01/9A/46/ Wkiom1ltlwcsqwjnaab1sykeft0487.png "alt=" Wkiom1ltlwcsqwjnaab1sykeft0487.png "/>

Reload Service , Squid-k reconfigure

650) this.width=650; "style=" Float:none; "title=" Picture 11.png "src=" https://s4.51cto.com/wyfs02/M01/9A/46/ Wkiom1ltlwgd-ctgaacczu9xvc8052.png "alt=" Wkiom1ltlwgd-ctgaacczu9xvc8052.png "/>

Verify:

The client shuts down the traditional proxy.

650) this.width=650; "style=" Float:none; "title=" Picture 12.png "src=" https://s1.51cto.com/wyfs02/M01/9A/47/ Wkiol1ltlwhzyiazaacxyqjjnx0875.png "alt=" Wkiol1ltlwhzyiazaacxyqjjnx0875.png "/>

( 5squid Span style= "FONT-FAMILY:CALIBRI;" >acl access control, requires internal client 192.168.1.0 net segment from Monday to Friday 9:00 Span style= "FONT-FAMILY:CALIBRI;FONT-SIZE:14PX;" >- 17:00 to use a proxy server to surf the internet, The internet is not allowed at other times, and the .mp3 Span style= "FONT-FAMILY:CALIBRI;" >.avi .rmvb

61.135.167.36

125.39.127.25

Modify The time of the Squid server, the client to verify the Internet.

The client verifies that the MP3 video file can be downloaded.

650) this.width=650; "style=" Float:none; "title=" Picture 13.png "src=" https://s1.51cto.com/wyfs02/M01/9A/47/ Wkiol1ltlwha8guraacmp7k5yy8885.png "alt=" Wkiol1ltlwha8guraacmp7k5yy8885.png "/>

650) this.width=650; "style=" Float:none; "title=" Picture 14.png "src=" https://s3.51cto.com/wyfs02/M02/9A/46/ Wkiom1ltlwktlxueaagspg6vkhm616.png "alt=" Wkiom1ltlwktlxueaagspg6vkhm616.png "/>

650) this.width=650; "style=" Float:none; "title=" Picture 15.png "src=" https://s4.51cto.com/wyfs02/M02/9A/47/ Wkiol1ltlwoh82traabxoe_gqhy457.png "alt=" Wkiol1ltlwoh82traabxoe_gqhy457.png "/>

Reload Service Squid-k reconfigure

Verify:

Create a . mp3 file on the web

650) this.width=650; "style=" Float:none; "title=" Picture 16.png "src=" https://s4.51cto.com/wyfs02/M00/9A/46/ Wkiom1ltlwozpt0oaaaqhqduogq646.png "alt=" Wkiom1ltlwozpt0oaaaqhqduogq646.png "/>

The. mp3 file cannot be downloaded.

650) this.width=650; "style=" Float:none; "title=" Picture 17.png "src=" https://s4.51cto.com/wyfs02/M00/9A/47/ Wkiol1ltlwtquiinaaa2rdjmc-i172.png "alt=" Wkiol1ltlwtquiinaaa2rdjmc-i172.png "/>

(6) install squid log analysis software sargon squid server, and make related configuration, And the client accesses the log analysis site.

650) this.width=650; "style=" Float:none; "title=" Picture 18.png "src=" https://s5.51cto.com/wyfs02/M01/9A/46/ Wkiom1ltlwsw9qd-aabcm0odjdw604.png "alt=" Wkiom1ltlwsw9qd-aabcm0odjdw604.png "/>

650) this.width=650; "style=" Float:none; "title=" Picture 19.png "src=" https://s1.51cto.com/wyfs02/M01/9A/47/ Wkiol1ltlwta8j0daagpbpail8s227.png "alt=" Wkiol1ltlwta8j0daagpbpail8s227.png "/>

installation Sarg Create the installation directory mkdri/usr/local/s

650) this.width=650; "style=" Float:none; "title=" Picture 20.png "src=" https://s5.51cto.com/wyfs02/M02/9A/46/ Wkiom1ltlwxjr3hjaaelntihigo692.png "alt=" Wkiom1ltlwxjr3hjaaelntihigo692.png "/>

650) this.width=650; "style=" Float:none; "title=" Picture 21.png "src=" https://s5.51cto.com/wyfs02/M02/9A/46/ Wkiom1ltlwxyau6laacyggjxy-y653.png "alt=" Wkiom1ltlwxyau6laacyggjxy-y653.png "/>

650) this.width=650; "style=" Float:none; "title=" Picture 22.png "src=" https://s1.51cto.com/wyfs02/M02/9A/47/ Wkiol1ltlwaj1ihmaadcx2wwigk732.png "alt=" Wkiol1ltlwaj1ihmaadcx2wwigk732.png "/>

650) this.width=650; "style=" Float:none; "title=" Picture 23.png "src=" https://s1.51cto.com/wyfs02/M00/9A/46/ Wkiom1ltlwahuz_1aae0vshxese960.png "alt=" Wkiom1ltlwahuz_1aae0vshxese960.png "/>

This article is from the "Duyuheng" blog, make sure to keep this source http://duyuheng.blog.51cto.com/12879147/1942829

Install Squid Proxy server for Linux installation

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.