eth0:218.247.50.23,外网口
eth1:192.168.0.1/24,内网口
squid.conf 部分
httpd_accel_port 80
httpd_accel_host virtual
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
acl allow_lan src 192.168.0.0/24
cache_access_log
cache_store_log
cache_log
cache_dir ufs /var/spool/squid 100 16 256
cache_effective_user squid
cache_effective_group squid
iptables 部份
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j SNAT --to 218.247.50.23
iptables -t nat -A PREROUTING -s 192.168.0.0/24 -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
echo 1 > /proc/sys/net/ipv4/ip_forward
今天所做的实验哦
阅读(2173) | 评论(1) | 转发(0) |