[Debian] Squid 安裝與設定

[前置動作] 這裡可以根據您的需要,選擇squid 2.x或squid 3.x。 squid 2.x aptitude install squid squid 3.x aptitude install squid3   [一般設...

[前置動作]

這裡可以根據您的需要,選擇squid 2.x或squid 3.x。

  1. squid 2.x
    aptitude install squid
  2. squid 3.x
    aptitude install squid3

 

[一般設定squid.conf]

squid 2.x

nano /etc/squid/squid.conf

 

# http_port 是提供 Proxy Client 連接所使用的 Port,
#Default:
http_port 3128
icp_port 0

# icp_query_timeout 設定 icp query timeout 的時間(ms)
# Default:
icp_query_timeout 0

# hierarchy_stoplist cgi-bin ?
hierarchy_stoplist cgi-bin ?

acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 64 MB

#調整cache swap的高低水平,以維持cache資料有效率的置換
cache_swap_low 80
cache_swap_high 95

# 當單一資料超過此大小便不 cache 在硬碟中,限制單一資料的『檔案的容量』。
maximum_object_size 4096 KB

#限制cache digests 可暫存 IP、Domain Name紀錄的容量。
ipcache_size 32768
ipcache_low 80
ipcache_high 95

# 完整主機名稱(FQDN)紀錄筆數。
fqdncache_size 4096

# PROXY存放資料的位置及硬碟容量 第一層及第二層目錄數
cache_dir ufs /var/spool/squid 4096 32 256

# 以下為各項系統記錄檔所在目錄設定。各 log file 設定如下:
# access.log 為 proxy 所有使用記錄檔。
# cache.log 為系統運作狀況記錄檔,應常去查看是否正常。
# 需在 crontab 中執行 /usr/bin/squid -k rotate 做每日定時
# 清除 log file,否則會因 log file 太大,而塞爆系統。
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_swap_log /var/log/squid/swap.log
cache_store_log none
logfile_rotate 3

dns_children 6

 

[進階squid.conf設定]

redirect_children 20

acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443
acl Safe_ports port 21 80 443 3128
acl connect method CONNECT

 

acl PASSWORD proxy_auth REQUIRED
acl proxyAccess external NT_global_group "/etc/squid/ntgroup.acl"
deny_info no_proxAccess_right proxyAccess

 

# for AD

# Authentication for IE
auth_param ntlm program /usr/bin/ntlm_auth --helper-protocol=squid-2.6-ntlmssp
auth_param ntlm children 50
auth_param ntlm max_challenge_reuses 0
auth_param ntlm max_challenge_lifetime 10 minutes
auth_param ntlm use_ntlm_negotiate on

 

squid 3.x

目前為測試版,部分設定檔與squid 2.x不同,但影響不大。

 

 

鳥哥-伺服器第一版書

筆記-proxy v18(2007.10.12)

http://www.squid-cache.org/Versions/v3/3.0/cfgman/

名稱

2330,1,27.5G,1,快速分享,1,李宗瑞,1,抽獎,1,省思,10,研討會,6,風水,2,旅遊,4,書摘,4,健康,3,教學,13,就要醬玩,1,無痛,1,愛美,4,愛情,11,網路資源,43,懶人包,1,Adobe,7,Apollo,5,CHANEL,1,Cisco,3,Coldfusion,13,Colud Storage,1,DD-WRT,8,Dropbox,2,Dropbox 18G,1,Flash,2,Flex,44,Fon,11,Game,1,Kuso,15,Linux,88,Microsoft,13,Movie,7,Nas Server,79,Other,25,Revolution,2,SQL,4,Tip,44,Web,13,
ltr
item
fjufirefox: [Debian] Squid 安裝與設定
[Debian] Squid 安裝與設定
fjufirefox
https://fjufirefox.blogspot.com/2008/01/debian-squid.html
https://fjufirefox.blogspot.com/
https://fjufirefox.blogspot.com/
https://fjufirefox.blogspot.com/2008/01/debian-squid.html
true
37845053
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share. STEP 2: Click the link you shared to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy