推 kenduest: DK 大回覆 :D 09/19 13:50
※ 引述《fordmvp (無名氏)》之銘言:
: 之前用Ubuntu 14.04桌面版安裝iptables 用string封鎖字串可以成功,後來改安裝
: centos7.6安裝iptables但同樣的指令雖然可以執行確實際沒有封鎖,請問何解?
: 後來有看到網路上有webstr和weburl指令,確卻無法執行。
: 補充說明
: 原來是
: iptables -t mangle -A POSTROUTING -s xxx.xxx.xxx.xxx -m string --algo bm
: --string "game" -j DROP
: 現在是還可以執行,但沒效果。
: 我的iptables 是v1.4.21
: 我的架構是將兩張網卡橋接,但不用nat和虛擬ip等,是用真實ip。
: 網路上的指令
: iptables -A FORWARD -m webstr --url "www.google.com" -j DROP
: iptables -A FORWARD -m weburl --contains "yahoo" -j DROP
: 都無法執行
: 是因為缺模組嗎?
: 懇請高手解答。
如果不要求太嚴格的話,可以測試看看 https://github.com/Lochnair/xt_tls
這個套件,透過 SNI 的資訊過濾...
官方範例裡面有個雷的地方,用 "\*.yahoo.com" 擋結果沒用,測了幾次後發現
直接用 "*.yahoo.com" 就可以了,你可以測試看看...
--
Resistance is futile.
https://blog.gslin.org/ & <[email protected]>
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 122.116.104.21 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1568630943.A.296.html