给自己看的squid服务器配置笔记
时间:2010-10-15 来源:linuxguy
编译参数:
iptables -t nat -A PREROUTING -s 192.168.0.0/24 -p tcp --dport 80 -j REDIRECT --to-ports 3128
编译源码
./configure --prefix=/usr/local/squid
--enable-arp-acl
--enable-linux-netfilter
--enable-auth="basic"
--enable-baisc-auth-helpers="NCSA" #########加上认证模块
--enable-underscore
#########################################
auth_param basic program /usr/bin/ncsa_auth /etc/squid/password ## 指定passwd文件
auth_param basic children 5 ##可以登录用户个数
auth_param basic credentialsttl 2 hours
visible_hostname gzud10018 ##本地服务器主机名
acl auth proxy_auth REQUIRED ##启动acl 登录认证
acl all src 0.0.0.0 ##配置 acl 名字为 all 样式为 src
#acl manager proto cache_object
acl to dst 219.133.34.92 ####acl 名字为 to,样式为dst ,
acl to dst 219.133.34.69
acl to dst 219.133.34.77
acl to dst 219.133.36.38
acl to dst 219.133.36.39
acl to dst 219.133.59.156
acl to dst