跳到主要內容

Apache 防止 bot 的設定

1、

 Options All -Indexes

RewriteEngine on


# Block Bad Bots & Scrapers

SetEnvIfNoCase User-Agent "Aboundex" bad_bot

SetEnvIfNoCase User-Agent "80legs" bad_bot

SetEnvIfNoCase User-Agent "360Spider" bad_bot

SetEnvIfNoCase User-Agent "^Java" bad_bot

SetEnvIfNoCase User-Agent "^Cogentbot" bad_bot

SetEnvIfNoCase User-Agent "^Alexibot" bad_bot

SetEnvIfNoCase User-Agent "^asterias" bad_bot

SetEnvIfNoCase User-Agent "^attach" bad_bot

SetEnvIfNoCase User-Agent "^BackDoorBot" bad_bot

SetEnvIfNoCase User-Agent "^BackWeb" bad_bot

SetEnvIfNoCase User-Agent "Bandit" bad_bot

SetEnvIfNoCase User-Agent "^BatchFTP" bad_bot

SetEnvIfNoCase User-Agent "^Bigfoot" bad_bot

SetEnvIfNoCase User-Agent "^Black.Hole" bad_bot

SetEnvIfNoCase User-Agent "^BlackWidow" bad_bot

SetEnvIfNoCase User-Agent "^BlowFish" bad_bot

SetEnvIfNoCase User-Agent "^BotALot" bad_bot

SetEnvIfNoCase User-Agent "Buddy" bad_bot

SetEnvIfNoCase User-Agent "^BuiltBotTough" bad_bot

SetEnvIfNoCase User-Agent "^Bullseye" bad_bot

SetEnvIfNoCase User-Agent "^BunnySlippers" bad_bot

SetEnvIfNoCase User-Agent "^Cegbfeieh" bad_bot

SetEnvIfNoCase User-Agent "^CheeseBot" bad_bot

SetEnvIfNoCase User-Agent "^CherryPicker" bad_bot

SetEnvIfNoCase User-Agent "^ChinaClaw" bad_bot

SetEnvIfNoCase User-Agent "Collector" bad_bot

SetEnvIfNoCase User-Agent "Copier" bad_bot

SetEnvIfNoCase User-Agent "^CopyRightCheck" bad_bot

SetEnvIfNoCase User-Agent "^cosmos" bad_bot

SetEnvIfNoCase User-Agent "^Crescent" bad_bot

SetEnvIfNoCase User-Agent "^Custo" bad_bot

SetEnvIfNoCase User-Agent "^AIBOT" bad_bot

SetEnvIfNoCase User-Agent "^DISCo" bad_bot

SetEnvIfNoCase User-Agent "^DIIbot" bad_bot

SetEnvIfNoCase User-Agent "^DittoSpyder" bad_bot

SetEnvIfNoCase User-Agent "^Download\ Demon" bad_bot

SetEnvIfNoCase User-Agent "^Download\ Devil" bad_bot

SetEnvIfNoCase User-Agent "^Download\ Wonder" bad_bot

SetEnvIfNoCase User-Agent "^dragonfly" bad_bot

SetEnvIfNoCase User-Agent "^Drip" bad_bot

SetEnvIfNoCase User-Agent "^eCatch" bad_bot

SetEnvIfNoCase User-Agent "^EasyDL" bad_bot

SetEnvIfNoCase User-Agent "^ebingbong" bad_bot

SetEnvIfNoCase User-Agent "^EirGrabber" bad_bot

SetEnvIfNoCase User-Agent "^EmailCollector" bad_bot

SetEnvIfNoCase User-Agent "^EmailSiphon" bad_bot

SetEnvIfNoCase User-Agent "^EmailWolf" bad_bot

SetEnvIfNoCase User-Agent "^EroCrawler" bad_bot

SetEnvIfNoCase User-Agent "^Exabot" bad_bot

SetEnvIfNoCase User-Agent "^Express\ WebPictures" bad_bot

SetEnvIfNoCase User-Agent "Extractor" bad_bot

SetEnvIfNoCase User-Agent "^EyeNetIE" bad_bot

SetEnvIfNoCase User-Agent "^Foobot" bad_bot

SetEnvIfNoCase User-Agent "^flunky" bad_bot

SetEnvIfNoCase User-Agent "^FrontPage" bad_bot

SetEnvIfNoCase User-Agent "^Go-Ahead-Got-It" bad_bot

SetEnvIfNoCase User-Agent "^gotit" bad_bot

SetEnvIfNoCase User-Agent "^GrabNet" bad_bot

SetEnvIfNoCase User-Agent "^Grafula" bad_bot

SetEnvIfNoCase User-Agent "^Harvest" bad_bot

SetEnvIfNoCase User-Agent "^hloader" bad_bot

SetEnvIfNoCase User-Agent "^HMView" bad_bot

SetEnvIfNoCase User-Agent "^HTTrack" bad_bot

SetEnvIfNoCase User-Agent "^humanlinks" bad_bot

SetEnvIfNoCase User-Agent "^IlseBot" bad_bot

SetEnvIfNoCase User-Agent "^Image\ Stripper" bad_bot

SetEnvIfNoCase User-Agent "^Image\ Sucker" bad_bot

SetEnvIfNoCase User-Agent "Indy\ Library" bad_bot

SetEnvIfNoCase User-Agent "^InfoNaviRobot" bad_bot

SetEnvIfNoCase User-Agent "^InfoTekies" bad_bot

SetEnvIfNoCase User-Agent "^Intelliseek" bad_bot

SetEnvIfNoCase User-Agent "^InterGET" bad_bot

SetEnvIfNoCase User-Agent "^Internet\ Ninja" bad_bot

SetEnvIfNoCase User-Agent "^Iria" bad_bot

SetEnvIfNoCase User-Agent "^Jakarta" bad_bot

SetEnvIfNoCase User-Agent "^JennyBot" bad_bot

SetEnvIfNoCase User-Agent "^JetCar" bad_bot

SetEnvIfNoCase User-Agent "^JOC" bad_bot

SetEnvIfNoCase User-Agent "^JustView" bad_bot

SetEnvIfNoCase User-Agent "^Jyxobot" bad_bot

SetEnvIfNoCase User-Agent "^Kenjin.Spider" bad_bot

SetEnvIfNoCase User-Agent "^Keyword.Density" bad_bot

SetEnvIfNoCase User-Agent "^larbin" bad_bot

SetEnvIfNoCase User-Agent "^LexiBot" bad_bot

SetEnvIfNoCase User-Agent "^lftp" bad_bot

SetEnvIfNoCase User-Agent "^libWeb/clsHTTP" bad_bot

SetEnvIfNoCase User-Agent "^likse" bad_bot

SetEnvIfNoCase User-Agent "^LinkextractorPro" bad_bot

SetEnvIfNoCase User-Agent "^LinkScan/8.1a.Unix" bad_bot

SetEnvIfNoCase User-Agent "^LNSpiderguy" bad_bot

SetEnvIfNoCase User-Agent "^LinkWalker" bad_bot

SetEnvIfNoCase User-Agent "^lwp-trivial" bad_bot

SetEnvIfNoCase User-Agent "^LWP::Simple" bad_bot

SetEnvIfNoCase User-Agent "^Magnet" bad_bot

SetEnvIfNoCase User-Agent "^Mag-Net" bad_bot

SetEnvIfNoCase User-Agent "^MarkWatch" bad_bot

SetEnvIfNoCase User-Agent "^Mass\ Downloader" bad_bot

SetEnvIfNoCase User-Agent "^Mata.Hari" bad_bot

SetEnvIfNoCase User-Agent "^Memo" bad_bot

SetEnvIfNoCase User-Agent "^Microsoft.URL" bad_bot

SetEnvIfNoCase User-Agent "^Microsoft\ URL\ Control" bad_bot

SetEnvIfNoCase User-Agent "^MIDown\ tool" bad_bot

SetEnvIfNoCase User-Agent "^MIIxpc" bad_bot

SetEnvIfNoCase User-Agent "^Mirror" bad_bot

SetEnvIfNoCase User-Agent "^Missigua\ Locator" bad_bot

SetEnvIfNoCase User-Agent "^Mister\ PiX" bad_bot

SetEnvIfNoCase User-Agent "^moget" bad_bot

SetEnvIfNoCase User-Agent "^Mozilla/3.Mozilla/2.01" bad_bot

SetEnvIfNoCase User-Agent "^Mozilla.*NEWT" bad_bot

SetEnvIfNoCase User-Agent "^NAMEPROTECT" bad_bot

SetEnvIfNoCase User-Agent "^Navroad" bad_bot

SetEnvIfNoCase User-Agent "^NearSite" bad_bot

SetEnvIfNoCase User-Agent "^NetAnts" bad_bot

SetEnvIfNoCase User-Agent "^Netcraft" bad_bot

SetEnvIfNoCase User-Agent "^NetMechanic" bad_bot

SetEnvIfNoCase User-Agent "^NetSpider" bad_bot

SetEnvIfNoCase User-Agent "^Net\ Vampire" bad_bot

SetEnvIfNoCase User-Agent "^NetZIP" bad_bot

SetEnvIfNoCase User-Agent "^NextGenSearchBot" bad_bot

SetEnvIfNoCase User-Agent "^NG" bad_bot

SetEnvIfNoCase User-Agent "^NICErsPRO" bad_bot

SetEnvIfNoCase User-Agent "^niki-bot" bad_bot

SetEnvIfNoCase User-Agent "^NimbleCrawler" bad_bot

SetEnvIfNoCase User-Agent "^Ninja" bad_bot

SetEnvIfNoCase User-Agent "^NPbot" bad_bot

SetEnvIfNoCase User-Agent "^Octopus" bad_bot

SetEnvIfNoCase User-Agent "^Offline\ Explorer" bad_bot

SetEnvIfNoCase User-Agent "^Offline\ Navigator" bad_bot

SetEnvIfNoCase User-Agent "^Openfind" bad_bot

SetEnvIfNoCase User-Agent "^OutfoxBot" bad_bot

SetEnvIfNoCase User-Agent "^PageGrabber" bad_bot

SetEnvIfNoCase User-Agent "^Papa\ Foto" bad_bot

SetEnvIfNoCase User-Agent "^pavuk" bad_bot

SetEnvIfNoCase User-Agent "^pcBrowser" bad_bot

SetEnvIfNoCase User-Agent "^PHP\ version\ tracker" bad_bot

SetEnvIfNoCase User-Agent "^Pockey" bad_bot

SetEnvIfNoCase User-Agent "^ProPowerBot/2.14" bad_bot

SetEnvIfNoCase User-Agent "^ProWebWalker" bad_bot

SetEnvIfNoCase User-Agent "^psbot" bad_bot

SetEnvIfNoCase User-Agent "^Pump" bad_bot

SetEnvIfNoCase User-Agent "^QueryN.Metasearch" bad_bot

SetEnvIfNoCase User-Agent "^RealDownload" bad_bot

SetEnvIfNoCase User-Agent "Reaper" bad_bot

SetEnvIfNoCase User-Agent "Recorder" bad_bot

SetEnvIfNoCase User-Agent "^ReGet" bad_bot

SetEnvIfNoCase User-Agent "^RepoMonkey" bad_bot

SetEnvIfNoCase User-Agent "^RMA" bad_bot

SetEnvIfNoCase User-Agent "Siphon" bad_bot

SetEnvIfNoCase User-Agent "^SiteSnagger" bad_bot

SetEnvIfNoCase User-Agent "^SlySearch" bad_bot

SetEnvIfNoCase User-Agent "^SmartDownload" bad_bot

SetEnvIfNoCase User-Agent "^Snake" bad_bot

SetEnvIfNoCase User-Agent "^Snapbot" bad_bot

SetEnvIfNoCase User-Agent "^Snoopy" bad_bot

SetEnvIfNoCase User-Agent "^sogou" bad_bot

SetEnvIfNoCase User-Agent "^SpaceBison" bad_bot

SetEnvIfNoCase User-Agent "^SpankBot" bad_bot

SetEnvIfNoCase User-Agent "^spanner" bad_bot

SetEnvIfNoCase User-Agent "^Sqworm" bad_bot

SetEnvIfNoCase User-Agent "Stripper" bad_bot

SetEnvIfNoCase User-Agent "Sucker" bad_bot

SetEnvIfNoCase User-Agent "^SuperBot" bad_bot

SetEnvIfNoCase User-Agent "^SuperHTTP" bad_bot

SetEnvIfNoCase User-Agent "^Surfbot" bad_bot

SetEnvIfNoCase User-Agent "^suzuran" bad_bot

SetEnvIfNoCase User-Agent "^Szukacz/1.4" bad_bot

SetEnvIfNoCase User-Agent "^tAkeOut" bad_bot

SetEnvIfNoCase User-Agent "^Teleport" bad_bot

SetEnvIfNoCase User-Agent "^Telesoft" bad_bot

SetEnvIfNoCase User-Agent "^TurnitinBot/1.5" bad_bot

SetEnvIfNoCase User-Agent "^The.Intraformant" bad_bot

SetEnvIfNoCase User-Agent "^TheNomad" bad_bot

SetEnvIfNoCase User-Agent "^TightTwatBot" bad_bot

SetEnvIfNoCase User-Agent "^Titan" bad_bot

SetEnvIfNoCase User-Agent "^True_Robot" bad_bot

SetEnvIfNoCase User-Agent "^turingos" bad_bot

SetEnvIfNoCase User-Agent "^TurnitinBot" bad_bot

SetEnvIfNoCase User-Agent "^URLy.Warning" bad_bot

SetEnvIfNoCase User-Agent "^Vacuum" bad_bot

SetEnvIfNoCase User-Agent "^VCI" bad_bot

SetEnvIfNoCase User-Agent "^VoidEYE" bad_bot

SetEnvIfNoCase User-Agent "^Web\ Image\ Collector" bad_bot

SetEnvIfNoCase User-Agent "^Web\ Sucker" bad_bot

SetEnvIfNoCase User-Agent "^WebAuto" bad_bot

SetEnvIfNoCase User-Agent "^WebBandit" bad_bot

SetEnvIfNoCase User-Agent "^Webclipping.com" bad_bot

SetEnvIfNoCase User-Agent "^WebCopier" bad_bot

SetEnvIfNoCase User-Agent "^WebEMailExtrac.*" bad_bot

SetEnvIfNoCase User-Agent "^WebEnhancer" bad_bot

SetEnvIfNoCase User-Agent "^WebFetch" bad_bot

SetEnvIfNoCase User-Agent "^WebGo\ IS" bad_bot

SetEnvIfNoCase User-Agent "^Web.Image.Collector" bad_bot

SetEnvIfNoCase User-Agent "^WebLeacher" bad_bot

SetEnvIfNoCase User-Agent "^WebmasterWorldForumBot" bad_bot

SetEnvIfNoCase User-Agent "^WebReaper" bad_bot

SetEnvIfNoCase User-Agent "^WebSauger" bad_bot

SetEnvIfNoCase User-Agent "^Website\ eXtractor" bad_bot

SetEnvIfNoCase User-Agent "^Website\ Quester" bad_bot

SetEnvIfNoCase User-Agent "^Webster" bad_bot

SetEnvIfNoCase User-Agent "^WebStripper" bad_bot

SetEnvIfNoCase User-Agent "^WebWhacker" bad_bot

SetEnvIfNoCase User-Agent "^WebZIP" bad_bot

SetEnvIfNoCase User-Agent "Whacker" bad_bot

SetEnvIfNoCase User-Agent "^Widow" bad_bot

SetEnvIfNoCase User-Agent "^WISENutbot" bad_bot

SetEnvIfNoCase User-Agent "^WWWOFFLE" bad_bot

SetEnvIfNoCase User-Agent "^WWW-Collector-E" bad_bot

SetEnvIfNoCase User-Agent "^Xaldon" bad_bot

SetEnvIfNoCase User-Agent "^Xenu" bad_bot

SetEnvIfNoCase User-Agent "^Zeus" bad_bot

SetEnvIfNoCase User-Agent "ZmEu" bad_bot

SetEnvIfNoCase User-Agent "^Zyborg" bad_bot


# Vulnerability Scanners

SetEnvIfNoCase User-Agent "Acunetix" bad_bot

SetEnvIfNoCase User-Agent "FHscan" bad_bot


# Aggressive Chinese Search Engine

SetEnvIfNoCase User-Agent "Baiduspider" bad_bot


# Aggressive Russian Search Engine

SetEnvIfNoCase User-Agent "Yandex" bad_bot



<Limit GET POST HEAD>

Order Allow,Deny

Allow from all


# Cyveillance

deny from 38.100.19.8/29

deny from 38.100.21.0/24

deny from 38.100.41.64/26

deny from 38.105.71.0/25

deny from 38.105.83.0/27

deny from 38.112.21.140/30

deny from 38.118.42.32/29

deny from 65.213.208.128/27

deny from 65.222.176.96/27

deny from 65.222.185.72/29


Deny from env=bad_bot

</Limit>

https://help.dreamhost.com/hc/en-us/articles/216105077-How-can-I-control-bots-spiders-and-crawlers-

 


留言

這個網誌中的熱門文章

Arudino 教學(三):多顆 LEDs

本次實作將加深 LED 電路,練習多顆 LEDs 與共地線電路,並使用 Arduino Uno 進行控制。另外, 本次實作每個同學需要抄寫「實作目的」、「線路說明」、「程式說明」與「進階」作為實作報告。 實作目的: 熟悉多顆 LEDs 與共地線電路接線 使用 Arduino 程式進行多顆 LEDs 控制 電路圖: 線路說明: LEDs 負極(短腳)共同連接在一起,再接至 Arduino GND(接地)腳位 LEDs 正極(長腳)先連接一220Ω 電阻之後,再分別連接至 Arduino 10 號與 11號腳位 程式截圖: 程式說明: 在 setup 區塊中,利用 pinMode 設定 10 腳位為輸出用途,設定 11 腳位為輸出用途 在 loop 區域中,利用 digitalWrite 送出 HIGH 點亮  LED,LOW 關閉 LED 燈,其中 10 號腳位 HIGH 時,11號腳位則為 LOW,反之亦然 delay(1000) 延遲一秒 進階: 改變延遲時間 增加閃動變化 增加 LED 的數量

SSH Tunnel(Port Forwarding)的應用

自己在管理伺服器和防火牆原則是最小開放原則,一定需要的服務 port 才會開放,例如網頁伺服器的 80、443 等。而管理用的 ssh ,可以的話就限縮來源 IP 範圍,加上限制可以登入的帳號或群組,要不然就改 port 編號;不過,改 port 編號會變成自己在遠端登入時要回想是改成多少,有點不是很方便。 所以最近建置的伺服器就不改 port 了,會加上 fail2ban 的防衛機制。 因為最小開放原則,像是 webmin(10000)這樣的 port 就不會開放,如果想要用的話,就用 ssh tunnel 方式作跳板連接。 例如伺服器的 public ip:123.123.123.123,要連 webmin 的話,就用: ssh 123.123.123.123 -L 10000:127.0.0.1:10000 SSH 登入後就會在客戶端開啟 127.0.0.1:10000 的監聽埠,用瀏覽器連本機的 127.0.0.1:10000 就會跳到伺服器端的 10000 埠。 一直以來,我都以為 ssh -L (Local Port Forwarding)方式只會在本機端綁定 127.0.0.1:xxxx的情形。不過,最近因為要解決一個臨時伺服器的設定問題,才發現原來不是只能綁在 127.0.0.1 上。 網路架構: 外部 public ip:123.123.123.0/24 內部 private ip:10.1.0.0/16 內部切出多個 class C的網路區域,其中 10.1.1.0/24 是 ServerZone,在外面用 DNAT 的方式將服務要求導入內部的伺服器。 其他 10.1.n.0/24 是各個區域內容IP,只能 NAT 出去,外部不能訪問到。 需求: Server-01:10.1.1.2,Server-02:10.1.20.2 Server-01在 ServerZone 內,從外部可以訪問,Server-02 在 PrivateZone 內,外部連不到。ServerZone 和 PrivateZone 彼此可以 SSH 互連。 現在希望可以在不變動兩台 Server 的 IP 區域,讓 Server-02可以被外部訪問到。 最簡單的方式就是先登 Server-01後,再從 Server-01 terminal 登到 Server-02上。但是需求是,...

IPv6 系列(五):KEA DHCP SERVER

學校在純 IPv4 的環境時,採用 ISC-DHCP Server 來發放教學區域的私有 IP(10.10.xxx.xxx),並使用閘道 Fortigate 作 NAT 連接到 Internet。 採用 IPv6 後,原本是要使用 ISC-DHCPv6 來作為 IPv6 發放,結果 ISC-DHCPv6 架不起來。不過在查詢 DHCPv6 的過程中,發現 ISC(Internet System Consortium)已開發出下一代的 DHCP Server:Kea Dhcp Server。 Kea Dhcp Server 官網: https://www.isc.org/kea/ 摘錄  https://www.itread01.com/content/1548712273.html  對 Kea DHCP Server 的介紹: Kea DHCP Server 由 Internet Systems Consortium(ISC) 開發的開源 DHCPv4/DHCPv6 伺服器。Kea DHCP Server 是一個高效能的,可擴充套件的DHCP伺服器引擎。通過hooks library可以很容易的修改和擴充套件。 Kea包含的功能元件 keactrl — kea伺服器啟動,停止,配置重置和狀態查詢元件 kea-dhcp4 — DHCPv4伺服器程式,用於響應客戶端的DHCPv4查詢。 kea-dhcp6 — DHCPv6伺服器程式,用於響應客戶端的DHCPv6查詢。 kea-dhcp-ddns — DHCP動態DNS程式.這個程式在DHCP伺服器和DNS伺服器之間扮演者調解者。它接收來自DHCP伺服器域名更新請求和傳送DNS更新訊息給DNS伺服器。也就是說DDNS捕獲使用者每次變化的IP地址,然後將其與域名相對應,這樣其他上網使用者就可以通過域名來進行交流。而最終客戶所要記憶的全部,就是記住動態域名商給予的域名即可,而不用去管他們是如何實現的。 軟體執行環境 加密庫Botan或者OpenSSL log4cplus 1.0.3+ 如果有需要mysql,需要MySQL headers and libraries。可選(postgresql、cassandra類同) 選用 Kea DHCP Server 的原因,...