【求助】請問squid proxy架設問題 我一直架不起來



贊助商連結


terco
2003-06-05, 04:37 PM
請問squid架設問題 我一直架不起來
可否請教一下有經驗的人架設步驟是哪些
我是安裝完後進入 /etc/squid/squid.cong編輯
把註解拿掉

http_port 3128
cache_mem 12 MB
cache_dir ufs /var/spool/squid 100 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log

還有
reference_age 1 month
cache_mgr root

acl flag src 192.168.0.0/255.255.255.0

就這些

然後建立快取目錄
# squid -z

然後
# /etc/rc.d/init.d/squid restart

確認squid執行
# ps aux |grep squid
root 2106 0.0 0.4 3928 1068 ? S 17:14 0:00 squid -D
squid 2108 0.0 1.7 6252 4216 ? S 17:14 0:00 (squid) -D
squid 2109 0.0 0.1 1336 284 ? S 17:14 0:00 (unlinkd)




但是還是起不來
請問有經驗得人我是哪裡做錯ㄚ

請指教
謝謝

贊助商連結


repsol
2003-06-05, 09:37 PM
最初由 terco 發表
請問
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log


acl flag src 192.168.0.0/255.255.255.0



看看這三個log寫些什麼??

還有檢查你整個acl rule 的先後順序...
是否有寫錯,結果被deny了


註解的設定都拿掉???不太懂妳拿掉的意思ㄟ
能否說清楚一點??

# The default Squid config file shows what the defaults for
# various options happen to be. .If you don't need to change thedefault, you shouldn't uncomment the line. Doing so may cause run-time problems. In some cases "none" refers to no
default
# setting at all , while in other cases it refers to a valid
# option - the comments for that keyword indicate if this is the
#

terco
2003-06-06, 01:25 AM
最初由 repsol 發表
看看這三個log寫些什麼??

還有檢查你整個acl rule 的先後順序...
是否有寫錯,結果被deny了


註解的設定都拿掉???不太懂妳拿掉的意思ㄟ
能否說清楚一點??


那3個是紀錄連進proxy的紀錄檔而已 不使用也沒關西 書是這麼說

註解的設定是說
本來是#acl flag src 192.168.0.0/255.255.255.0
變成acl flag src 192.168.0.0/255.255.255.0

我把井字號拿掉了

mus000
2003-06-06, 02:10 AM
這一行 acl flag src 192.168.0.0/255.255.255.0
的作用書上有沒有說明?
這行是用來指定一組控制名稱為 flag 的範圍在哪裡用的。

然後 ..... 最重要的部份,你有沒有把這個 flag 放進你的連線權限裡面去呢??

你找找有沒有一行的設定是這樣子的:
http_access deny all
阻擋所有連線請求。

請在這一行前面加上你的 flag 權限吧。
如下:
http_access allow flag
http_access deny all

cc169
2003-06-08, 11:37 AM
1.請檢查你的網路設定DNS,Host部分是否設定了,可正常使用嗎?。
2.還有以rpm安裝也要檢查檔案使用權限,如Cache.log.......。
3.查看Cache.log是否有錯誤碼,如果有的話,就去google 直接打上去查應該都可以找到答案。
以上為個人經驗提供給你參考。

terco
2003-06-09, 12:42 PM
再請教一下

acl flag src 192.168.0.0/255.255.255.0

src是什麼??

他有幾種模式可以選擇

repsol
2003-06-09, 04:24 PM
src 只是定義使用 acl type 的其中一種
定義使用 ip 為 acl type

# acl aclname src ip-address/netmask ... (clients IP address)
# acl aclname src addr1-addr2/netmask ... (range of addresses)

可以使用的模式

# acltype is one of src dst srcdomain dstdomain url_pattern
# urlpath_pattern time port proto method browser user

其實這些都是從squid sample config file 抄下來的.. :)
我自己用過
url_regex
urlpath_regex
src
port