How to Use squid for Windows to set up a second-level Proxy Server

Source: Internet
Author: User
Tags squid proxy

1. Download and install squid for Windows

Download the squid of windwosnt:

Http://squid.acmeconsulting.it/download/squid-2.6.STABLE13-bin.zip

1. Decompress squid-2.6.stable13-bin.zip and copy the squid folder to C:/(squid is C:/Squid by default)

2. Put

Copy squid. conf. Default and rename it Squid. conf.

Copy cachemgr. conf. Default and rename it as cachemgr. conf.

Mime. conf. Default copy a copy and rename it as mime. conf.

3. Use a text editor to open squid. conf, where you need to modify it:

Locate http_port 3128 and add a line later

Http_port 80 transparent

Find # cache_peer sib2.foo.net sibling 3128 3130 [proxy-only] and add a line later

Cache_peer 192.168.1.8 parent 7001 0 no-query originserver

Find # Tag: visible_hostname, and add a line to the end.

Visible_hostname volcano (any name)

Locate http_access deny all and add # comment out this line, and then add a line

Http_access allow all

4. Run the following command from the command line to the C:/squid/sbin directory:

Squid-I (add the squid service to the Service)

Squid-z

Installation Complete

5. Start squid from the service

Access the squid Server:

Http: // 192.168.1.2 (your squid Server IP address) >>> point to http: // 192.168.1.8: 7001 (Web server address)

If you open # http_access deny all and comment out http_access allow all, your access will be rejected.

You need to configure: Find the following two lines

# ACL our_networks SRC 192.168.1.0/24 192.168.2.0/24

# Http_access allow our_networks

Open the comment and modify your intranet IP address (segment) to 192.168.1.0/24.

Ii. Squid. conf configuration file

Cache_mgr ghxu@zju.edu.cn # Set administrator mailbox, irrelevant

Visible_hostname ibi # Set the virtual host name. It seems that squid2.5 requires

# Set this item, but 2.4 does not need it

Cache_peer 10.10.2.53 parent 6666 3130 login = Account: passwd default no-Query

# Set the upper-level proxy, where 10.10.2.53 is the proxy address in our school, and 6666 is the port number,

# Account, passwd is the password of the Internet account (of course I will not post our real account)

# Hierarchy_stoplist cgi-bin? # Comment out this line, or you cannot access the line "? "

# URL

# ACL query urlpath_regex cgi-bin? # The two rows have no specific tests and should be related to CGI requests.

# No_cache deny Query

ACL all SRC 0.0.0.0/0.0.0.0

ACL manager proto cache_object

ACL localhost SRC 127.0.0.1/255.255.255.255

ACL ssl_ports port 443 563

ACL safe_ports port 80 # HTTP

ACL safe_ports port 21 # ftp

ACL safe_ports port 443 563 # https, snews

ACL safe_ports port 70 # Gopher

ACL safe_ports port 210 # wais

ACL safe_ports port 1025-65535 # unregistered ports

ACL safe_ports port 280 # http-Mgmt

ACL safe_ports port 488 # GSS-HTTP

ACL safe_ports port 591 # FileMaker

ACL safe_ports port 777 # multiling HTTP

ACL connect method connect

ACL Lan-a SRC 10.49.41.150-10.49.41.190/32 # control the IP address. This line defines an IP address

# Segment is group Lan-

Http_access allow Lan-A # the IP address of control group Lan-A can use Squid proxy.

ACL Lan-B SRC 10.141.96.0/24 # an IP segment is also set. The first three IP addresses are

# All IP addresses of 10.141.96 are actually the IP segments of our dormitory.

Http_access allow Lan-B

Http_access allow manager localhost

Http_access deny Manager

Http_access deny! Safe_ports

Http_access deny connect! Ssl_ports

Http_access allow localhost

Http_access deny all

Icp_access allow all

Never_direct allow all # This line solves the problem of login failure.

Related Article

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.