linux:一个功能较全的squid配置文件

一个功能较全的squi配置文件

#用户认证auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwordauth_param basic children 5auth_param basic realm Squid proxy-caching web serverauth_param basic credentialsttl 1 hoursauth_param basic casesensitive off

acl all src 0.0.0.0/0.0.0.0acl manager proto cache_objectacl localhost src 127.0.0.1/255.255.255.255acl to_localhost dst 127.0.0.0/8acl SSL_ports port 443acl Safe_ports port 80# httpacl Safe_ports port 21# ftpacl Safe_ports port 443# httpsacl Safe_ports port 70# gopheracl Safe_ports port 210# waisacl Safe_ports port 1025-65535# unregistered portsacl Safe_ports port 280# http-mgmtacl Safe_ports port 488# gss-httpacl Safe_ports port 591# filemakeracl Safe_ports port 777# multiling httpacl CONNECT method CONNECT

http_access allow manager localhosthttp_access deny managerhttp_access deny !Safe_portshttp_access deny CONNECT !SSL_ports

#本网段用户可以上网acl our_networks src 192.168.1.0/24 192.168.2.0/24http_access deny !our_networks

#绑定mac和ipacl userip src 192.168.1.3acl usermac arp 00:0C:29:4E:F5:92http_access deny usermac !useriphttp_access deny !usermac userip

http_access allow localhost

#每个人的连接限制为一个acl onlyone maxconn 2http_access deny onlyone

#一个用户只能从一个ip登录代理服务器acl perip max_user_ip -s 1http_access allow perip

#阻拦某些关键字开头的网址acl badhead dstdom_regex -i ^news ^game ^pic ^xxxhttp_access deny badhead

#阻拦带有某些关键的网址acl badurl urlpath_regex -i news game pic sex mp3 xxxhttp_access deny badurl

#阻拦具体网站acl badsite url_regex -i www.msn.com www.xxx.com xxx.comhttp_access deny badsite

#禁止下载某些类型的文件acl badfile url_regex -i /.mp3$ /.vbs$ /.rmvb$ /.rm /.exe$ /.mpg$ /.mpeg$http_access deny badfile

#授权用户可以访问webacl userauth proxy_auth REQUIREDhttp_access allow userauth

#其他用户连接一律拒绝http_access deny all

icp_access allow all

log_uses_indirect_client on

http_port 3128

hierarchy_stoplist cgi-bin ?

acl QUERY urlpath_regex cgi-bin /?

cache deny QUERYcache_mem 16 MBcache_dir ufs /var/spool/squid 100 16 256access_log /var/log/squid/access.log squid

mime_table /etc/squid/mime.confpid_filename /var/run/squid.pidftp_telnet_protocol on

refresh_pattern ^ftp:144020%10080refresh_pattern ^gopher:14400%1440refresh_pattern .020%4320

acl apache rep_header Server ^Apachebroken_vary_encoding allow apache

half_closed_clients oncache_mgr root@lrq.commail_program mail

cache_effective_user squidcache_effective_group squidvisible_hostname fc8.lrq.com

delay_pools 1error_directory /usr/share/squid/errors/Simplify_Chinese

check_hostnames ondns_timeout 2 minutesdns_nameservers 192.168.1.254 202.96.134.133

fqdncache_size 1024forwarded_for onclient_db onuri_whitespace stripcoredump_dir /var/spool/squid

自己要先看得起自己,别人才会看得起你

linux:一个功能较全的squid配置文件

相关文章:

你感兴趣的文章:

标签云: