Squid學習筆記

2021-06-10 08:12:21 字數 1109 閱讀 2402

a. acl訪問控制介紹:

格式: acl 名字 型別 內容

httpd_access all或deny

名字:這裡的名字和acl的名字是一致的方能生效

在acl中型別有這幾種:src ,dst, port ,srcdomain, dstdomain, time, maxcom, url_regex,urlpath_regex

在acl裡內容就自己定義.

1. 禁止ip位址為192.168.16.200的客戶機上網。

2. 禁止192.168.1.0這個子網裡所有客戶機上網。

3. 禁止使用者訪問ip位址為210.21.118.68的**。

4. 禁止使用者訪問網域名稱為www.163.com的**。

acl baddomain1 dstdomain -i www.163.com

1. 初始化squid快取目錄

squid -zx

squid -ncd1

2. 啟動/停止/重啟**服務

/etc/init.d/squid start/stop/restart

3. 停止**服務

/etc/init.d/squid stop

squid –k shutdown

4. 重新載入配置檔案

/etc/rc.d/init.d/squid reload

squid -k reconfig

5. 通過crontab每小時截斷/輪循日誌

59 * * * */usr/sbin/squid -k rotate

service squid start/status/stop/restart

squid學習筆記 1

squid安裝 可以從squid站點http www.squid cache.org獲取該 版,如red squid啟動 squid z 初始化cache squit start 啟動squid squid k parse 檢查配置是否有錯誤,沒有任何輸出,證明配置基本是正確的 squid zx 可...

Linux學習筆記 Squid

squid 1.squid正向 真機 虛擬機器 瀏覽器 edit preferences advanced network settings manual proxy configuration http proxy 172.25.254.29 port 3128 ok 2.squid反向 加速 1...

squid 原始碼學習2

下面的類共同協作,完成了乙個物件鍊錶 任何從asynccall繼承的物件都可以插入鍊錶 擁有可定義的fire函式,實現自己的功能,並在鍊錶中依次被調動 鍊錶中物件都可自動記錄引用計數 基類,完成記錄次數的自增自減和返回 struct refcountable virtual recountable ...