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