Squid Proxy可以Block網址嗎?



贊助商連結


rainfile
2002-03-21, 12:26 PM
我安裝了Squid,但是我不想別人使用ICQ和到訪一些色情網站,我如何在Squid釨lock port和Block url呢?

可否告知在那一個檔案

贊助商連結


repsol
2002-03-21, 03:01 PM
試試這邊的設定 ...


不知道是不是你想要的那樣....



# acl aclname url_regex [-i] ^http:// ... # regex matching on whole URL
# acl aclname port 80 70 21 ...
# acl aclname port 0-1024 ... # ranges allowed


配合http_access deny

rainfile
2002-03-22, 04:31 PM
對不起,不行啊
我想把www.nba.com的網吝/url]}Block掉︳是這樣子嗎?
acl aclname url_regex [-i] ^[url]http://www.nba.com regex matching on whole URL

可以說明一下?

repsol
2002-03-22, 05:14 PM
acl nba url_regex ^http://www.nba.com/$

http_access deny nba
注意一下 其他rules 的 deny 和 allow 的先後順序

rainfile
2002-03-27, 04:17 PM
可否告訴我Block port 的方法呢?
假如我要Block port 80的話(假設)

是否這樣
acl wrongs port 80
http_access deny wrongs

repsol
2002-03-28, 12:34 AM
是的


這樣的設定應該是沒錯的...


squid 要重跑才會設定才會生效喔..