安裝並設置好 Fail2ban 後(可以參考Y Cheung 之前寫的『Fail2ban 配置 Nginx filter』),可以看到在 /etc/fail2ban/filter.d/nginx-badbots.conf 內容如下:
1# /etc/fail2ban/filter.d/nginx-badbots.conf 2# Fail2Ban configuration file 3# 4# Regexp to catch known spambots and software alike. Please verify 5# that it is your intent to block IPs which were driven by 6# above mentioned bots. 7 8[Definition] 9 10badbotscustom = EmailCollector|WebEMailExtrac|TrackBack/1\.02|sogou music spider|(?:Mozilla/\d+\.\d+ )?Jorgee 11 12badbots = Atomic_Email_Hunter/4\.0|atSpider/1\.0|autoemailspider|bwh3_user_agent|China Local Browse 2\.6|ContactBot/0\.2|ContentSmartz|DataCha0s/2\.0|DBrowse 1\.4b|DBrowse 1\.4d|Demo Bot DOT 16b|Demo Bot Z 16b|DSurf15a 01|DSurf15a 71|DSurf15a 81|DSurf15a VA|EBrowse 1\.4b|Educate Search VxB|EmailSiphon|EmailSpider|EmailWolf 1\.00|ESurf15a 15|ExtractorPro|Franklin Locator 1\.8|FSurf15a 01|Full Web Bot 0416B|Full Web Bot 0516B|Full Web Bot 2816B|Guestbook Auto Submitter|Industry Program 1\.0\.x|ISC Systems iRc Search 2\.1|IUPUI Research Bot v 1\.9a|LARBIN-EXPERIMENTAL \(efp@gmx\.net\)|LetsCrawl\.com/1\.0 \+http\://letscrawl\.com/|Lincoln State Web Browser|LMQueueBot/0\.2|LWP\:\:Simple/5\.803|Mac Finder 1\.0\.xx|MFC Foundation Class Library 4\.0|Microsoft URL Control - 6\.00\.8xxx|Missauga Locate 1\.0\.0|Missigua Locator 1\.9|Missouri College Browse|Mizzu Labs 2\.2|Mo College 1\.9|MVAClient|Mozilla/2\.0 \(compatible; NEWT ActiveX; Win32\)|Mozilla/3\.0 \(compatible; Indy Library\)|Mozilla/3\.0 \(compatible; scan4mail \(advanced version\) http\://www\.peterspages\.net/?scan4mail\)|Mozilla/4\.0 \(compatible; Advanced Email Extractor v2\.xx\)|Mozilla/4\.0 \(compatible; Iplexx Spider/1\.0 http\://www\.iplexx\.at\)|Mozilla/4\.0 \(compatible; MSIE 5\.0; Windows NT; DigExt; DTS Agent|Mozilla/4\.0 efp@gmx\.net|Mozilla/5\.0 \(Version\: xxxx Type\:xx\)|NameOfAgent \(CMS Spider\)|NASA Search 1\.0|Nsauditor/1\.x|PBrowse 1\.4b|PEval 1\.4b|Poirot|Port Huron Labs|Production Bot 0116B|Production Bot 2016B|Production Bot DOT 3016B|Program Shareware 1\.0\.2|PSurf15a 11|PSurf15a 51|PSurf15a VA|psycheclone|RSurf15a 41|RSurf15a 51|RSurf15a 81|searchbot admin@google\.com|ShablastBot 1\.0|snap\.com beta crawler v0|Snapbot/1\.0|Snapbot/1\.0 \(Snap Shots, \+http\://www\.snap\.com\)|sogou develop spider|Sogou Orion spider/3\.0\(\+http\://www\.sogou\.com/docs/help/webmasters\.htm#07\)|sogou spider|Sogou web spider/3\.0\(\+http\://www\.sogou\.com/docs/help/webmasters\.htm#07\)|sohu agent|SSurf15a 11 |TSurf15a 11|Under the Rainbow 2\.2|User-Agent\: Mozilla/4\.0 \(compatible; MSIE 6\.0; Windows NT 5\.1\)|VadixBot|WebVulnCrawl\.unknown/1\.0 libwww-perl/5\.803|Wells Search II|WEP Search 00 13 14failregex = ^<HOST> -.*"(GET|POST|HEAD).*HTTP.*"(?:%(badbots)s|%(badbotscustom)s)"$ 15 16ignoreregex = 17 18datepattern = {^LN-BEG}%%ExY(?P<_sep>[-/.])%%m(?P=_sep)%%d[T ]%%H:%%M:%%S(?:[.,]%%f)?(?:\s*%%z)? 19 ^[^\[]*\[({DATE}) 20 {^LN-BEG} 21 22# DEV Notes: 23# List of bad bots fetched from http://www.user-agents.org 24# Generated on Thu Nov 7 14:23:35 PST 2013 by files/gen_badbots. 25# 26# Author: Yaroslav Halchenko 如果沒有找到這個文件,請新建一個,或者將 apache-badbots.conf 拷貝並重命名。
在服務器上增加 iptables chain # 1iptables -N black_ip_list 2iptables -I INPUT -p tcp -m multiport --dports 80,443 -j black_ip_list 新建 bash 文件 banip.sh # 在這個文件中,首先清空 black_ip_list 中的規則, 然後從 mitchellkrogza/nginx-ultimate-bad-bot-blocker 中獲取最新的IP BLACKLIST 列表,循環每一個IP地址,將其設為拒絕請求。
默認情況下,crond 會將所有的輸出或者錯誤信息通過email發送給執行用戶。Y CHEUNG 一個沒注意就超過mailgun的每月免費額度,2個月了,趕緊查找問題解決它。
今天(週日)下午五點左右的時候,正悠閒的躺在床上刷手機,偶然看到Twitter上新聞說阿富汗喀布爾正發生銀行擠兌,銀行的現金都沒啦,紛紛關門停止營業
Cloudflare 是提供基於反向代理的內容傳遞網路及分布式域名解析的服務,也就是我們俗稱的CDN加速。它不僅可以緩存網站內容,加速網站提升用戶體驗,還能進行簡單的防火牆設置,讓你的網站和服務器更安全。
如果您不是運動員或積極健身人士,又想要為了健康或美麗的體型而鍛煉,那麼健身房場景可能會令人生畏。有時候只需在跑步機、室內健身自行車和舉重機旁走幾步,就足以讓您洩氣得直接回到沙發上。
docker-compose.yml # 本指南運行環境系 MacBook 上的 Docker 內,相關容器配置如下:
1# docker-compose.yml 2version: '3' 3services: 4 mysql: 5 image: mariadb:10.2 6 restart: always 7 volumes: 8 - '~/Documents/Datas/laravel/mysql:/var/lib/mysql' 9 ports: 10 - '127.0.0.1:23306:3306' 11 environment: 12 MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' 13 MYSQL_DATABASE: 'puppy' 14 laravel: 15 image: ycheung/laravel-dev 16 restart: always 17 ports: 18 - '8081:80' 19 - '9001:9001' 20 volumes: 21 - '~/Documents/laravel:/var/www/html' 22 depends_on: 23 - mysql 24 - mailhog 25 mailhog: 26 image: mailhog/mailhog 27 ports: 28 - "1025:1025" 29 - "8025:8025" 30 selenium-hub: 31 image: selenium/hub 32 container_name: selenium-hub 33 ports: 34 - "4444:4444" 35 chrome: 36 image: selenium/node-chrome 37 volumes: 38 - '/dev/shm:/dev/shm' 39 depends_on: 40 - selenium-hub 41 environment: 42 - HUB_HOST=selenium-hub 43 - HUB_PORT=4444 44 - JAVA_OPTS=-Dwebdriver.chrome.whitelistedIps= 安裝 Laravel Dusk # 1composer require --dev laravel/dusk composer install dusk 執行安裝腳本 # 執行安裝腳本,生成測試目錄 tests/Browser 和示例測試文件
結構化資料是一種標準化格式,它提供網頁相關資訊並將網頁內容分類,有助於優化搜索引擎SEO。
⚠ 即使網頁已正確加上標記,Google 也不能保證結構化資料一定會出現在搜尋結果中。