ubuntu10.04 squid配置

1、開放防火牆端口

2、配置squid.conf

acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl SSL_ports port 443 # https
acl SSL_ports port 563 # snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT

#abcgc persons-------------------------------
acl jcx arp 00:24:1D:88:58:28
acl brw arp 00:1E:8C:AE:05:77
acl lxx arp 6C:F0:49:A0:0E:89
acl yy  arp 6C:F0:49:78:36:AF
acl hwt arp 00:22:19:06:B8:8B
acl hhb arp 00:24:1D:DE:04:12
acl jzd arp 00:22:19:06:B8:4D
acl js  arp 6C:F0:49:08:92:1C
acl lw  arp 00:07:E9:D9:17:AA
acl pjc arp 00:1A:A0:8F:71:BE
acl zjm arp 6C:F0:49:81:B3:FB
acl chh arp 00:24:1D:88:64:7E
#acl lwm arp
#acl slm arp
acl abc arp 00:1B:FC:2B:F7:C0


#active ----------------------------------------
acl worktime time M T W H F 7:30-9:30 13:00-15:00

#control-------------------------------------------
http_access allow jcx
http_access allow hwt
http_access allow js
http_access allow lw
http_access allow zjm
http_access allow abc

http_access deny !worktime

http_access allow brw
http_access allow lxx
##http_access allow yy 
##http_access allow hhb
http_access allow jzd
http_access allow pjc
http_access allow chh
##http_access allow lwm
##http_access allow slm
#http_access allow abc 
#---------------------------------------------------


http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
icp_access allow localnet
icp_access deny all
http_port 3128

#---------------------------------------------
cache_mem 64 MB
cache_swap_low 80
cache_swap_high 85
maximum_object_size 32768 KB
#maxium_object_size_in_memory 8KB
cache_dir ufs /var/spool/squid 4096 64 1024
cache_effective_user proxy
cache_effective_group proxy
#---------------------------------------------

hierarchy_stoplist cgi-bin ?
access_log /var/log/squid/access.log squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Package(.gz)*)$ 0 20% 2880
refresh_pattern . 0 20% 4320
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
extension_methods REPORT MERGE MKACTIVITY CHECKOUT
hosts_file /etc/hosts
coredump_dir /var/spool/squid
visible_hostname abcproxy

3、改/var/spool/squid的用戶名、用戶組爲proxy
發佈了96 篇原創文章 · 獲贊 3 · 訪問量 5萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章