Wordfence 教學

首頁 » 開網店 » Wordfence 教學

Wordfence 網站安全防火牆 (WordPress 外掛)

本 Wordfence 教學會說明 Wordfence 外掛的安裝和使用設置。

當你用 WordPress 搭建網站,你網站可能存在網路安全性問題,必須自己安裝一套防火牆保護網站,避免被黑客攻擊或木馬入侵。Wordfence 是個 WordPress plugin (外掛),給 WordPress 網站提供安全防火牆的保護功能。

假設你 WordPress 網站的最終目的是開網店,即包含電子商務功能的網站,例如  Woocommerce 外掛,就更需要做好妥善的網站安全防火牆。

Wordfence 提供兩個版本:

  • 免費版本
  • 付費版本 (Premium)

在 Wordfence 教學中,我們會使用免費版本。

200多個給你網站獲取用戶的方法
不需要廣告費用去推廣你的網站
Free Traffic Sources Guide by Gordon Choi
下載 PDF 電子書
fts-200

Wordfence 的主要功能

Wordfence 主要的功能有:

網站應用程序防火牆

作為網站一個網站防火牆,Wordfence 可有效過濾你網站的流量 (訪問)。 當檢測到對你網站的可疑請求的訪問時,Wordfence 會自動阻止該訪問。

惡意軟件掃描程序

作為一個惡意軟件掃描程序,Wordfence 可掃描所有的 WordPress 核心文件、主題 (themes)、外掛 (plugins)、上傳文件夾、等。 WordPress 更會跟踪任何更改,並可找到可疑的代碼。

安裝和激活 Wordfence 外掛

你必須搜尋、安裝、激活 Wordfence 外掛。

下載 Wordfence Security Plugin 的官方地址是:

https://wordpress.org/plugins/wordfence/
https://www.wordfence.com/

或者直接登入你 WordPress 賬戶後,從左邊菜單選 Plugins,並點擊 Add New。

Search Wordfence Plugin in WordPress

在關鍵字搜尋欄中輸入 Wordfence。

Install Wordfence

出現 Wordfence 外掛後,點擊 Install Now (立即安裝),並點擊 Activate (激活)。

Wordfence 初始設定

Enter Email Wordfence Alerts

輸入你的電郵地址,以後用來接收 Wordfence 發出的關於你 WordPress 網站的安全警報。

選中 (Yes 或 No),即接收或不接收其他 WordPress 相關 資訊的電子郵件。

勾選 By checking this box, I agree to the Wordfence terms and privacy policy,並點擊 Contine 按鈕。

Wordfence Premium License Key

已經購買並要使用付費 Premium 版本,可輸入 Premium key,並點擊 Install。

我們這次使用Wordfence 免費版本,點擊 No Thanks。

這時候,Wordfence 的初步設定就完成了。

初次使用 Wordfence

Wordfence Dashboard Menu

選中左邊菜單上的 Wordfence。

第一次進入界面,Wordfence dashboard 會提供幾個信息提示,包括:

This is your Dashboard (這個是你的儀表板)
The Wordfence Dashboard provides valuable insights into the current state of your site’s security. You’ll find useful data summarized here as well as important status updates and notifications. (Wordfence 儀表板可提供對相關網站安全狀態的見解。 你會在獲得有用的數據,以及重要的狀態更新通知。)

Easily Monitor Your Wordfence Protection (輕鬆監控你的 Wordfence 保護)
Each feature contains a status that reminds you what’s enabled, disabled or needs attention. The Notifications section will highlight actions you need to take. (每個功能都會顯示一個狀態,包括啟用,禁用或需要注意。 通知部分顯示你需要執行的操作。)

Global Wordfence Options (全局 Wordfence 選項)
You’ll find this icon throughout the plugin. Clicking it will show you the options and features for each section of Wordfence. From the dashboard, you can find the Global Options for Wordfence such as alerts, automatic updates, and managing your site’s Premium License.
(你會在每一個 Wordfence 界面上見到設定圖標,點擊圖標後會看到每一部分的選項。 在儀表板上,你可以找到 Wordfence 的全局選項,例如警報、自動更新、管理網站的高級許可證。)

你點擊 Next 按鈕就可跳過信息提示。

WordPress 登入警報

假如你安裝 Wordfence 後,不做任何規則設置,Wordpress 的登入警報還是會自動被啟動。即是當你每次登入 WordPress 賬戶後台,你會接收到一封警報 (alert) 電郵。警報電郵的標題 (subject) 會是:

[Wordfence Alert] www.example.com Admin Login

掃描網站

點擊左邊菜單上的 Scan。

Start new scan (Wordfence)

點擊 Start new scan 按鈕會啟動網站掃描。

掃描完成後,會顯示以下信息分類:

  • Posts, Comments & Files (博文、評論、文件)
  • Themes & Plugins (主題和外掛)
  • Users Checked (已檢查的用戶帳戶)
  • URLs Checked (已檢查的網址 URL)
  • Results Found (獲得的結果)

例如,在 Results Found 底下,會給你展示哪些需要升級 (upgrade) 的外掛。

啟動防火牆並限制對你網站的訪問

點擊左邊菜單上的 Firewall。

Firewall (防火牆) 下,對你網站可以有以下幾種保護:

  • Advanced Firewall Options (進階防火牆選項)
  • Brute Force Protection (蠻力保護)
  • Rate Limiting (限速)
  • Whitelisted URLs (列入白名單的網址)

wordfence-firewall-rate-limiting

點擊 Rate Limiting 連結。

在 Rate Limiting 裡,你可:

  • 對網絡蜘蛛設定訪問/抓取你網站的限制。
  • 減少對你網站伺服器資源的濫用或伺服器被非法攻擊。
  • 防止你網站的數據被盜竊。

你可按以下條件去限制對你網站/伺服器的訪問:

  • How should we treat Google’s crawlers (Wordfence 必須對Google 蜘蛛做出哪些對應) – 在這個選項下,你可單獨對 Google 蜘蛛做限制。
  • If anyone’s requests exceed (當一個用戶的訪問請求超過某個次數)
  • If a crawler’s page views exceed (當網絡蜘蛛在你網站上的一張頁面超過多少次的瀏覽)
  • If a crawler’s pages not found (404) exceed (當網絡蜘蛛對你網頁的訪問,產生超過某個次數的不存在頁面)
  • If a human’s page views exceed (當用戶在你網站上的一張頁面超過多少次的瀏覽)
  • If a human’s pages not found (404) exceed (當用戶對你網頁的訪問,產生超過某個次數的不存在頁面)
  • How long is an IP address blocked when it breaks a rule (需要對某個違規的 IP地址,限制多長時間的訪問)

訪問屏蔽

Blocking (Wordfence Firewall)

如果你將 Wordfence 升級到 Pro (專業) 版本,你可使用 Blocking (訪問屏蔽) 去屏蔽特定的外來訪問。

Wordfence 付費版本,可按以下條件屏蔽訪問者 (包括用戶訪問和網路蜘蛛訪問):

  • IP 地址 (IP address)
  • IP 地址範圍 (IP address range)
  • 國家 (country)
  • 主機名 (hostname)
  • 推薦來源 (referrer)
  • 用戶代理 (user agent)

WordPress 文章推薦

WordPress 網站搭建技巧:

WordPress 網店外掛:

WordPress SEO: