[WordPress] 外掛分享: iQ Block Country

WordPress 外掛 iQ Block Country 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「iQ Block Country」是 2010-03-15 上架。
  • 目前有 20000 個安裝啟用數。
  • 上一次更新是 2025-05-01,距離現在已有 3 天。
  • 外掛最低要求 WordPress 3.5.2 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 7.4 以上。
  • 有 162 人給過評分。
  • 論壇上目前有 3 個提問,問題解答率 33%

外掛協作開發者

iqpascal |

外掛標籤

block | block spam | Geoblocking | ban countries | Block countries |

內容簡介

iQ Block Country 是一款外掛,可讓您限制網站內容的訪問。您可以允許或禁止來自指定國家的訪客訪問(部分)內容。

例如,如果您需要將內容限制在有限的幾個國家,則可以這樣做。如果您想封鎖惡意國家造成的問題,例如駭客攻擊、垃圾信箱留言等,也可以進行封鎖。

您是否希望將 WordPress 管理員後台網站限制為僅限您所在的國家?這完全是可能的!你甚至可以封鎖所有國家,只允許你的 IP 地址。

即使您封鎖了某個國家,您仍然可以通過添加其 IP 地址到允許列表中,允許某些訪問者,就像您可以允許某個國家,但將來自該國家的 IP 地址放到禁止列表中一樣。

您可以顯示被封鎖的訪客一則消息,您可以使用 CSS 來編排該消息的樣式,或者您可以將其重定向到 WordPress 網站內的某個頁面。或將訪問者重定向到外部網站。

您可以(不)允許訪問者閱讀博客文章、博客分類、頁面或所有內容。

停止訪問者在您的 WordPress 站點上進行有害行為,或限制能夠訪問您的博客的國家。為您的 WordPress 網站添加額外的安全層。

此插件使用 Maxmind 的 GeoLite 數據庫。它精度為 99.5%,對於一個免費數據庫非常好。如果您需要更高的精度,可以直接從 MaxMind 購買許可證。
如果您無法或不想從 Maxmind 下載 GeoIP 數據庫,您可以使用 https://webence.nl/geoip-api/ 上提供的 GeoIP API 網站。

如果您想使用 Maxmind 的 GeoLite 數據庫,您必須直接從 MaxMind 下載 GeoIP 數據庫並上傳到您的網站上。
WordPress 授權不允許此插件為您下載 MaxMind Geo 數據庫。

請注意,雖然此插件可以大大幫助您減少網站上“壞”訪問者的數量,但並不是絕對可靠的,那些真正想訪問您的網站的人還是有辦法進入。
這不是安全問題,而是當今的一個簡單事實。沒有人可以保證您 100% 的安全,因為這是善良者和惡劣者之間不斷爭議的一場戰爭。

如果您確定您的 Web 主機或自己不使用任何形式的快取或代理,我們建議在「首頁」選項卡中設置「覆蓋 IP 信息」為 REMOTE_ADDR

需要此插件的幫助嗎?請發送電子郵件至 [email protected]

GDPR 資訊

此插件會將有關訪客的數據存儲在您本地的 WordPress 數據庫中。可以在設置頁面上配置存儲此數據的天數,您也可以禁用記錄任何數據。

被封鎖訪客存儲的數據:

IP 地址
訪問日期和時間
被請求的 URL
IP 地址的所在國家
如果封鎖發生在您的後台或前端

非被封鎖的訪客存儲的數據:

如果您允許追蹤(是的,如果您這樣做!),您會與我們分享一些信息。這僅是在您的後台記錄被阻止請求的 IP 地址。沒有其他信息被發送,我們系統中只有 IP 地址被記錄,以收集該 IP 地址有多少次嘗試登錄到後台。我们不会记录受访的网站或任何 URL,仅仅是 IP 地址。因此,我们无法将 IP 地址追溯到特定的网站或用户。如果一个 IP 地址一个月内没有再次被封,则将从列表中删除。

如果您使用 GeoIP API 服务,则会向我们的某个服务器发送您的访问者 IP 地址。但这个IP地址在任何情况下都不会与个人相关联,因为没有任何其他信息与之匹配。

原文外掛簡介

iQ Block Country is a plugin that allows you to limit access to your website content. You can either allow or disallow visitors from defined countries to (parts of) your content.
For instance if you have content that should be restricted to a limited set of countries you can do so.
If you want to block rogue countries that cause issues like for instance hack attempts, spamming of your comments etc you can block them as well.
Do you want secure your WordPress Admin backend site to only your country? Entirely possible! You can even block all countries and only allow your ip address.
And even if you block a country you can still allow certain visitors by putting their ip address on the allow list just like you can allow a country but put ip addresses on the block list from that country.
You can show blocked visitors a message which you can style by using CSS or you can redirect them to a page within your WordPress site. Or you can redirect the visitors to an external website.
You can (dis)allow visitors to blog articles, blog categories or pages or all content.
Stop visitors from doing harmful things on your WordPress site or limit the countries that can access your blog. Add an additional layer of security to your WordPress site.
This plugin uses the GeoLite database from Maxmind. It has a 99.5% accuracy so that is pretty good for a free database. If you need higher accuracy you can buy a license from MaxMind directly.
If you cannot or do not want to download the GeoIP database from Maxmind you can use the GeoIP API website available on https://webence.nl/geoip-api/
If you want to use the GeoLite database from Maxmind you will have to download the GeoIP database from MaxMind directly and upload it to your site.
The WordPress license does not allow this plugin to download the MaxMind Geo database for you.
Please be aware that although this plugin can help you greatly with reducing the number of ‘bad’ visitors on your website it is not fool proof and those who really want to visit your site may find a away.
This is not a security issue but a simple fact of today. Nobody can guarantee you 100% security as it is a constant battle between the good guys and the bad guys.
If you are sure your webhosting or yourself does not use any form of caching or proxying we recommend setting the “Override IP information” on the Home tab to REMOTE_ADDR
Do you need help with this plugin? Please email [email protected].
GDPR Information
This plugin stores data about your visitors in your local WordPress database. The number of days this data is stores can be configured on the settings page. You can also disable logging any data.
Data which is stored of blocked visitors:

IP Address
Date and time of the visit
URL that was requested
Country of the IP address
If the block happened on your backend or your frontend

Data which is stored on non blocked visitors:

Nothing

If you allow tracking (yeah if you do!) you share some information with us. This is only the IP address of a blocked request on your backend. No other information is send and only the IP address is logged on our systems to gather how many times that IP address have attempted to login to a backend. We do not log which site was visited or which URL just only the IP address So we cannot lead an ip address back to a specific website or user. If an IP address is not blocked again within a month we will remove the IP address from the list.
If you use the GeoIP API service you send the IP address of your visitor to one of our servers. This IP Address is however in no way stored at our servers and only used to convert it to a country id.
Using this plugin with a caching plugin
Please note that many of the caching plugins are not compatible with this plugin. The nature of caching is that a dynamically build web page is cached into a static page.
If a visitor is blocked this plugin sends header data where it supplies info that the page should not be cached. Many plugins however disregard this info and cache the page or the redirect. Resulting in valid visitors receiving a message that they are blocked. This is not a malfunction of this plugin.
Disclaimer: No guarantees are made but after some light testing the following caching plugins seem to work: Comet Cache, WP Super Cache
Plugins that do NOT work: W3 Total Cache, Hyper cache, WPRocket
Warning: Caching & Geo Blocking do not work well together.
In the best case scenario countries or IP’s you want to block get served a page from cache and when visiting non cached pages they get blocked. This is due to the fact when pages are served from cache the iQ Block Country plugin does not get started and can’t do it’s job.
If the caching plugin however ignores the caching headers you risk the chance that the block message gets cached and everyone gets to see they are blocked even the countries that you did not block.
If you’re fine with blocked countries getting served the page from cache then you’re fine using the iQ Block Country plugin.
If you’re not you should disable either the cache or the Geo Blocking. Or search for another solution outside WordPress (for instance by using the Varnish software) where you can GeoBlock at a caching level.
GeoIP API
For your convenience we offer a GeoIP API service. This API is not mandatory to use as you can always use the free MaxMind GeoIP Database.
If you do not want or can’t go through the hassle of updating your MaxMind GeoIP database we provide an API service to convert the IP address of your visitors to a country.
If you decide to purchase an GeoIP API Key via https://webence.nl/geoip-api/ you’ll get an eMail with your API Key (License Key).
Once you enter this key in your iQ Block Country settings your license key will be validated at our API service and a the nearest API server to you will be chosen. To do this your website will contact all API servers once to request
an empty file.
Once you use the API service the IP address of your visitors and your API key are send to one of the API servers and converted to a country. The plugin checks if the visitor should be blocked based on that country or not.
What is logged on our end?
* Upon validation of your license key your request will be logged in our webserver logs. (This will be the IP address of your webserver).
* Upon checking an IP address of your visitor this IP address is only used to convert it to the country it belongs to and is not logged. We have no way to link a visitors IP address to your website.
What is logged is your API Key and the Website URL making the request.
If you decide to purchase the GeoIP API key your PayPal account will be charged by PayPal on a yearly basis. If you want to cancel your subscription you can cancel the subscription at the PayPal website.
If no payments are made by PayPal your API key will automatically expire.
Privacy policy regarding this service specific can be found here: https://webence.nl/wp-content/uploads/2022/06/Privacy-Policy-Webence-API.pdf
MaxMind Database Usage
This plugin uses the Free version of the MaxMind GeoIP2 Country Database. You can also use the paid version but will have to make sure it is uploaded to the same location with the filename of Free database.
MaxMind Terms of Use: https://www.maxmind.com/en/terms-of-use
MaxMind Privacy Policy: https://www.maxmind.com/en/privacy-policy
Admin Block API
For some extra protection we offer the Admin Block API Key. This contains a list of known IP addresses that have visited various WordPress backends in the past month and were blocked.
If you decide to purchase an Admin Block API Key via https://webence.nl/admin-block-api/ you’ll get an eMail with your API Key (License Key).
If you decide to purchase an Admin Block API Key all visitors of your backend will be matched against this list and even if the visitor is from a country that is not blocked they will be blocked if the IP address is on the Admin Block List.
What is logged on our end?
* Upon validation of your license key your request will be logged in our webserver logs. (This will be the IP address of your webserver).
* Upon retrieving the updated blocklist (multiple times a day) this request is logged in our webserver logs (This will be the IP address of your webserver).
Privacy policy regarding this service specific can be found here: https://webence.nl/wp-content/uploads/2022/06/Privacy-Policy-Webence-API.pdf

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「iQ Block Country」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.1 | 1.1.1 | 1.1.2 | 1.1.3 | 1.1.4 | 1.1.5 | 1.1.6 | 1.1.7 | 1.1.8 | 1.1.9 | 1.2.0 | 1.2.1 | 1.2.2 | 1.2.3 | 1.2.4 | 1.2.5 | 1.2.6 | 1.2.7 | 1.2.8 | 1.2.9 | trunk | 1.1.10 | 1.1.11 | 1.1.12 | 1.1.13 | 1.1.14 | 1.1.15 | 1.1.16 | 1.1.17 | 1.1.18 | 1.1.19 | 1.1.20 | 1.1.21 | 1.1.22 | 1.1.23 | 1.1.24 | 1.1.25 | 1.1.26 | 1.1.27 | 1.1.28 | 1.1.29 | 1.1.30 | 1.1.31 | 1.1.32 | 1.1.33 | 1.1.34 | 1.1.35 | 1.1.36 | 1.1.37 | 1.1.38 | 1.1.40 | 1.1.42 | 1.1.43 | 1.1.44 | 1.1.45 | 1.1.46 | 1.1.47 | 1.1.48 | 1.1.49 | 1.1.50 | 1.1.51 | 1.2.10 | 1.2.11 | 1.2.12 | 1.2.13 | 1.2.14 | 1.2.15 | 1.2.16 | 1.2.17 | 1.2.18 | 1.2.19 | 1.2.21 | 1.2.22 | 1.2.23 | 1.2.24 |

延伸相關外掛(你可能也想知道)

  • Admin Country Allowlist 》- 這是一個提供給WordPress使用的最簡單的國家允許列表外掛程式。, - 使用QWeb的IP to country查詢API,將管理面板和XMLRPC訪問鎖定在允許的國家列表中。, - ...。

文章
Filter
Apply Filters
Mastodon