internet
|
|
vlan10--switch--vlan20
(H3C S3600)
|
|
vlan30
(web cache server 192.168.1.2)
1.配置pf.conf
rdr inet proto tcp from any to any port = www -> 127.0.0.1 port 3128
pass out proto tcp from 192.168.1.2 to any
pass out proto tcp from any port = 80 to any
pass in proto tcp from any port = 80 to 192.168.1.2
pass in proto eth from 192.168.1.1 to 192.168.1.2
2.配置/etc/sysctl.conf
net.inet.ip.forwarding=1
3.配置squid.conf
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_uses_host_header on
httpd_accel_with_proxy on
httpd_accel_single_host off