Solution for slitaz tazpkg upgrade

After the new release of slitaz cooking, version 20110531, it added new software packages, such as cherokee and nginx, etc. As the latest version of a testing release, testing environment is the best place for its living. However, I got 2 errors when doing tazpkg upgrade, the error messages are same as below:

can’t open [...]

Install Cherokee in Slitaz

Nowadays there is a new comer on web server market – cherokee, they said they won the benchmark and security measurement, plus a graphic admin interface for easy maintenance. It is a good choice with Slitaz to hold a web server, because both are small, young and growing.

N.B. : This article helps people build [...]

Slitaz 自己手動安裝 snort

有留意本欄既讀者都知道, Slitaz 是筆者喜愛既 distro 之一, 原因好簡單 — 硬件要求低.

作為一般家用伺服器, Slitaz 提供了與其他 distro 無異既軟件, php, apache, mysql, samba 等. 但它只需要 1GB 空間與最少 64mb RAM 甚至更少, 曾經網上討論過差不多 16mb RAM 仍可運作. 當 1GB RAM 已是標準配置既時代, 要運行暢順當然無問題. 其實作為伺服器, 主要就是為其他機器或人提供服務,對 RAM 及硬碟要求低正可將多出既資源回饋給所運行既服務提高負載率。

講返正題,因為 Slitaz 本身既 snort 並不支援 mysql,所以需要自行下載安裝程式。

先下載所需程式: (可在 Google 尋找) Snort 主程式及 Snort rules – http://www.snort.org jpgraph Adodb [...]

Compiling snort in Slitaz

I always like to use Slitaz running server, because of the benefit from it’s tiny size and low hardware requirement. More resources can be reserved for server service in compare with other distro.

With less than 1GB after installed in hard drive, it provides common server packages, including apache, php, mysql, samba, sure it contains [...]

Snort error: Failed to find LibVersion() in lib_sfdynamic_example_rule.so

近日發現運行 snort 時出現這句錯誤提示:

ERROR: Failed to find LibVersion() function in … snort_dynamicrules/lib_sfdynamic_example_rule.so

原來解決方法很簡單, 只要將 snort_dynamicrules 目錄內包含 “example” 字眼既檔案移除就可解決.

To solve the above error, just remove all files named “example” in snort_dynamicrules.

Privoxy 攔截廣告規則更新 / Privoxy rules update

自從使用了 privoxy 攔截廣告後, 大部份常去既網站都已經冇廣告顯示. 不過近日發現某大討論區內仍有廣告出現, 所以貼出此文去更新 privoxy 既規則. 開啟 default.action, 並更改如下設定:

在 {-handle-as-image}, 改為 /.*\.(js|php|css|.?html?|.asp?) 在 {+block{Path matches generic block pattern.}}, 加入 /(.*/)?houseads.js /(.*/)?aeiou 在 {+block{Might be a web-bug.} +handle-as-empty-document -handle-as-image}, 加入 .overture.com 在 Site-specific block-as-image patterns 的 Banner farms 內, 加入 .yimg.com/(.*/)?a/

儲存後重新啟動 privoxy 便可

As privoxy is cool apps on blocking web banner [...]

美軍在聖誕節前訂購 2200 部 PS3 遊戲機

據外電報導, 美軍訂購了 2200 部 PS3 遊戲機, 而該批遊戲機會在聖誔節前付運. 大家都可能覺得奇怪, 為何美軍會訂購遊戲機, 是否因為要將遊戲當成模擬訓練? 非也, 其實那批遊戲機其實另有用途.

PS3 除了是一部電玩外, 其實它可以被視為一部電腦, XBox 360亦然. 當中, PS3 已可安裝 Linux 作業系統. 美軍所訂購既 PS3 正正是為了利用它們建立一部 “超級電腦”. 可能會有人懷疑為什麼用 PS3 而棄用一般電腦, 說穿了是因為錢作怪. PS3 既運算能力其實不底, 一部 1u 大細 2 粒 3.2Ghz CPU 伺服器大約 US$8K, 但擁有差不多 3.2Ghz CPU 既 PS3 卻是大約 US$300, 這樣成本便大大降低. 而且測試過 PS3 所用既 CPU 為一般 CPU [...]

利用 privoxy 提高網絡安全性 (進階下篇)

在進階上篇使用 regular expressions 去強化 privoxy, 在這篇會介紹如果用 URL Blacklist.com 所提供既其他資源去進一步強化 privoxy.

先停止 privoxy 服務 因為 URL Blacklist.com 提供了大量分類網址, 為了簡單控制, 在 privoxy config 檔案的 actionsfile 段內加入獨立既 action 檔案. 例如: porn 會用 actionsfile porn.action 去區別. 建議參考 ads, malware, phishing, porn, spyware 及 virusinfected 在每一個新的 actionsfile 內, 將第一行設定為 block reason, 格式如下: {+block{Blacklist – (block reason).}} 將 URL Blacklist.com 中各分類內既檔案 [...]

利用 privoxy 提高網絡安全性 (進階上篇)

在基本篇介紹了怎樣安裝及增加基本設定, 在這一篇則介紹如果進一步使用 regular expression 去增加一些進階既設定. 因為 privoxy 本身依賴 regular expressions, 所以要參考 squidguard 方法, 到 URL Blacklist.com 下載分類網址, 其實主要使用其中幾個分類內的 expressions 檔 — ads, malware, 及 porn. 可因應需要更改, 注意以下設定與 URL Blacklist.com 所提供的有少少分別.

在 default.action 中將 Generic block patterns by path 段落 comment 為失效, 只保留 phpads(new) 加入下列各行: /(ads/|ad/|banner/|sponsor/|event.ng/|Advertisement/|advertisement/|adverts/) /(cgi-bin/nph-adclick\.exe|ads/media/images/|smartbanner/|\.com/ads/banners/|apfbanners/|Realmedia/ads/|realmedia/ads/|event\.ng/) /(pics/banner/|viewcgi?pool=|clicktrack|hittrack|images\.go2net\.com/go2net/ads/|\.com/banners/|\.com/httpads/|\.com/advertising/|ads/adview\.php\?) /^(ads\.|ad\.|adserver\.|k5ads\.) /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/search\?q=[0-9] /(adultos|adultsight|adultsite|adultsonly|adultweb|blow-job|bondage|centerfold|cumshot|cyberlust|cybercore|hardcore|incest|masturbat|obscene|pedophil|pedofil|playmate|pornstar|sexdream|showgirl|softcore|striptease|penis|vagina) 重新啟動 privoxy 令新設定生效

參考文章: URL [...]

利用 privoxy 提高網絡安全性

近日對網絡安全既興趣越來越大, 所以都開始諗一諗點做. 近日發現到一個細小既 proxy server – privoxy, 佢既好處在於除了支援 linux 之外, 仲支援 windows 及其他平台. 有興趣就去 http://www.privoxy.org 研究一下. 佢本身除了係 proxy server 之外, 最緊要佢有 content filtering 既功能, 可以有效阻擋廣告及不良網站. 而且, 軟件作者都好好心機, 軟件完全零設定, 安裝完便可立即使用. 當然, 進一步既設定及優化軟件對安全性同防止誤報有幫助. 以下會用 windows 平台做示範, 各位有興趣都可以試一下或互相討論一下.

安裝篇: (Windows)

到官方網址下載 安裝軟件包 最新版已經支援 windows 服務, 在安裝後到 C:\Program Files\Privoxy, 執行 privoxy –install 便可 之後可以在服務中, 選擇自動啟動或者手動執行

Linux 平台方面, 因為要由 compile [...]

mini-Howto: Slitaz Squid + SquidGuard

To enhance the content filtering feature in squid, Slitaz provides a package named SquidGuard. This mini-Howto shows a simple steps on adding SquidGuard to enhance the content filtering function.

Install and setup Squid (please refer to mini-Howto: Slitaz Squid) Install squidguard tazpkg get-install squidguard Check the last line of squid config file in /etc/squid/squid.conf, the [...]