Use squid to build a simple Proxy Server

Source: Internet
Author: User

Test performed under a virtual machine.

VM 1: (dual Nic)

The Intranet IP address of eth0 is 192.168.0.100/24.

Eth1 configure an Internet virtual IP address 200.168.0.100/24

VM 2:

IP Address: 200.168.0.101/24 (for test, it is in the same network segment as the above IP address)

PC:

192.168.0.110

1. Install squid

Install with yum

Yum install squid *-y

Modify configurations

VI/etc/squid. conf

Http_port 192.168.0.100: 3128

Visible_hostname 192.168.0.100

Cache_dir ufs/var/spool/squid 100 16 256 (16 indicates that 16 level-1 directories are created. Each level-1 directory has 256 level-2 directories. 100 indicates the size)

Add ACL filter rules

ACL name rules

ACL innet 192.168.0.0/24

ACL all 0.0.0.0/0.0.0.0

Http_access allow innet # Allow

Http_access deny all # prohibited IP segments

Start
Service squid restart
Reload
Squid-K reconfig

Change Firewall

Open Port 3128.

Test phase

Change iesettings

Enable a web server on VM 2

Enter 200.168.0.109 in the address bar of IE browser on PC for testing

Use squid to build a simple Proxy Server

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.