剑庭安
首页
黑客安全首页全部安全栏目 黑客技术黑客技术、渗透测试、漏洞利用工具与教程 安全软件安全工具、扫描器、检测与审计软件 病毒分析恶意软件分析、样本、逆向与沙箱 CTF思路CTF 题目、writeup、解题思路与工具 防护思路防御技术、加固、检测响应与蓝队 红蓝攻防红队攻击模拟、蓝队对抗、攻防演练 漏洞知识库漏洞、CVE、PoC、EXP 与安全研究
逆向|反编译
PHP源码PHP 网站源码、程序、系统 APP源码安卓/iOS APP 源码 ASP源码ASP 网站源码与程序 NET源码.NET 网站源码与系统 小程序源码微信/支付宝小程序源码 Dedecms风格模板Dedecms 织梦风格模板 Empirecms风格模板EmpireCMS 帝国风格模板 Discuz商业模板/插件Discuz 商业模板与插件 WordPress主题/插件WordPress 主题与插件 其它源码、模板其它各类源码与模板 游戏源码游戏源码与引擎项目 加密货币源码加密货币、区块链、钱包、USDT/比特币相关源码与工具 手游源码手机游戏源码、服务端、客户端与引擎项目 传奇源码热血传奇、传奇世界、复古传奇等客户端/服务端/引擎源码 页游源码网页游戏、H5 游戏、浏览器游戏源码 端游源码电脑单机游戏、PC 网游客户端/服务端源码
最新万能免驱动支持所有型号打印机下载程序 日历天气老黄历 · 每天同步真实日期与天气
站长工具站长工具 自助开通会员浏览该分类 其他资源qtziy SEO工具SEO工具 站群源码站群源码 泛程序泛程序 蜘蛛模板蜘蛛模板 蜘蛛池蜘蛛池 外链工具外链工具
搜索 自助开通会员🔓 破甲 API
登录 注册
首页 分类列表 安全软件 apache-ultimate-bad-bot-bloc…
安全软件
作者:admin 发布:2026-10-05

apache-ultimate-bad-bot-blocker - Apache Block Bad Bots, (Referer) Spam Referrer Blo

项目说明<img src=" alt="Apache Ultimate Bad Bot, User-Agent and Spam Referrer Blocker - Apache Block Bad Bots, User-Agents, Scanners, Malware…
资源可下载 免费下载 0 条讨论
会员资源
开通会员后即可下载全部资源。
登录后开通会员
会员方案
231浏览量
0讨论
2下载链接
可下载资源状态
内容可验证
更新 2026-10-05
人工审核发布
评论区答疑

项目说明

<img src=" alt="Apache Ultimate Bad Bot, User-Agent and Spam Referrer Blocker - Apache Block Bad Bots, User-Agents, Scanners, Malware, Adware, Ransomware, Malicious Sites, Spam Referrers, Bad Referrers, Spam Blocker, Porn Blocker, Gambling Blocker, Wordpress Theme Detector Blocking and Fail2Ban Jail for Repeat Offenders"/>

| REPO | BECOME A SPONSOR |
| :--: | :--: |
| ![DUB]() | Your logo and link to your domain will appear here if you become a sponsor. Simply email me on if you would like to sponsor this project as South Africa is not supported yet under the Github sponsor program. |
<a href=' src=' alt='Follow '></a> | Help Support Me at |

Apache Bad Bot and User-Agent Blocker, Spam Referrer Blocker, Bad IP Blocker and Wordpress Theme Detector Blocker


##### The Ultimate Apache (2.2 > 2.4+) Bad Bot, User-Agent, Spam Referrer Blocker, Adware, Malware and Ransomware Blocker, Clickjacking Blocker, Click Re-Directing Blocker, SEO Companies and Bad IP Blocker with Anti DDOS System, Nginx Rate Limiting and Wordpress Theme Detector Blocking. Stop and Block all kinds of bad internet traffic from e your web sites. PLEASE SEE: Definition of Bad Bots

_______________
#### : V3.2026.10.2743
#### Bad Referrer Count: 7115
#### Bad Bot Count: 699
#### Fake Googlebots: 218
____________________

  • Created by:

  • Copyright Mitchell Krog <>

  • Two of the Blocker ? PLEASE TAKE NOTE :exclamation:

    :exclamation:There are now two distinctly different of this blocker.:exclamation:

    <a href=" 2.2 > 2.4+ (access_compat)</a> [ TESTED ON APACHE 2.2 > 2.4.27 ]

    <a href=" 2.4+ ONLY</a> [ TESTED ON APACHE 2.4 > 2.4.34 ]

    For Support, Contributions & Idea Sharing

    Please make sure you are subscribed to Github Notifications to be notified when the blocker is updated or when any important or mission critical (potentially breaking) changes may take place.

    ##### Also follow me on twitter

    <a href=' src=' alt='Follow '></a>

    Help Support This Project

    <img src=" alt="Buy me Coffee" width="300"/>

    CONFIGURATION OF THE APACHE BAD BOT BLOCKER:

  • CPANEL Users read -

  • Users Unable to run the full Bot Blocker read -

  • Includes the creation of a google-exclude.txt file for creating filters / segments in Google Analytics (see instructions lower down)

  • Includes the creation of a google-disavow.txt file for use in Google Webmaster Tools (see instructions lower down)

  • Includes .htaccess and robots.txt files for users without root access to their Apache Servers.
  • <img src=" alt="Apache Bad Bot Blocker"/>


    <img src="

    COPY THE GLOBALBLACKLIST.CONF FILE FROM THE REPO
    $APACHE_CONF is generally located at /etc/apache2 or /etc/httpd depending on OS

    Copy the contents of globalblacklist.conf into your $APACHE_CONF/custom.d folder.
    e.g. /etc/apache2/custom.d on Ubuntu/Debian
    /etc/httpd on RHEL/centos
    You need to create this folder.

    The following directions use /etc/apache2 as an example.

    sudo mkdir /etc/apache2/custom.d

    sudo wget -O /etc/apache2/custom.d/globalblacklist.conf

    If your Linux distribution does not have wget you can replace the wget commands using curl as follows:

    curl -sL -o /etc/apache2/custom.d/globalblacklist.conf


    <img src="

    WHITELIST ALL YOUR OWN DOMAIN NAMES AND IP ADDRESSES

    Whitelist all your own domain names and IP addresses. Please note important changes, this is now done using include files so that you do not have to keep reinserting your whitelisted domains and IP addresses every time you update.

    :exclamation: :exclamation: :exclamation: WARNING: Please do NOT ever use 127.0.0.1 as a whitelisted IP address in whitelist-ips.conf it will cause the blocker to stop functioning.

  • copy the whitelist-ips.conf file into that folder
  • sudo wget -O /etc/apache2/custom.d/whitelist-ips.conf

  • copy the whitelist-domains.conf file into the same folder
  • sudo wget -O /etc/apache2/custom.d/whitelist-domains.conf

    Use nano, vim or any other text editor to edit both whitelist-ips.conf and whitelist-domains.conf to include all your own domain names and IP addresses that you want to specifically whitelist from the blocker script.

    When pulling any future updates now you can simply pull the latest globalblacklist.conf file and it will automatically include your whitelisted domains and IP addresses. No more remembering having to do this yourself.


    <img src="

    DOWNLOAD CUSTOM BLACKLIST INCLUDE FILE FOR IP ADDRESS AND IP RANGE BLOCKING

    Blacklist any IP addresses or Ranges you wish to keep out of your servers. Please note important changes, this is now done using include files so that you have full control over what IP addresses and IP Ranges and blocked from your Apache Server.

  • copy the blacklist-ips.conf file into that folder
  • sudo wget -O /etc/apache2/custom.d/blacklist-ips.conf

    Use nano, vim or any other text editor to edit the blacklist-ips.conf file as you like.

    When pulling any future updates now your custom IP blacklist will not be o.


    <img src="

    DOWNLOAD CUSTOM BAD REFERRER WORDS INCLUDE FILE FOR CUSTOMIZED SCANNING OF BAD WORDS

    Scan for any bad referrer words you wish to keep out of your servers. Please note important changes, this is now done using include files so that you have full control over what IP addresses and IP Ranges and blocked from your Apache Server.

  • copy the bad-referrer-words.conf file into that folder
  • sudo wget -O /etc/apache2/custom.d/bad-referrer-words.conf

    Use nano, vim or any other text editor to edit the bad-referrer-words.conf file as you like.

    When pulling any future updates now your custom bad referrer words list will not be o.


    <img src="

    DOWNLOAD CUSTOM BLACKLIST USER-AGENTS INCLUDE FILE FOR CUSTOMIZED BLOCKING OF USER AGENTS

    Allows you to add your own custom list of user agents with this new include file.

  • copy the blacklist-user-agents.conf file into that folder
  • sudo wget -O /etc/apache2/custom.d/blacklist-user-agents.conf

    NOTE: On the Apache Blocker if you want to o any of the whitelisted bots you can add them to this include file and the pre whitelisted bots in the blocker will be o by this include file. So let's say for some "obscure" reason you really do not want any search engines like Googlebot or Bingbot to e or index your site, you add them to your blacklist-user-agents.conf and they will be o from the earlier whitelisting in the blocker. This now gi total control over the blocker without every having to try and modify the globalblacklist.conf file. So now you can customize all your include files and you can still pull the daily updates of globalblacklist.conf and it will not touch any of your custom include files.


    <img src="

    INCLUDE THE GLOBALBLACKLIST.CONF

    Include the globalblacklist.conf file in the beginning of a directory block just after your opening Options statements and before the rest of your host config example below. Remove the "<<<<<< This needs to be added" part

    You can include globalblacklist.conf globally (for all hosts) if you put the following configuration after host configuration.


    <img src="

    TEST YOUR APACHE CONFIGURATION

    Do an Apache2 Config Test

    sudo apache2ctl configtest

    If you get no errors then you followed my instructions so now you can make the blocker go live with a simple.

    sudo service apache2 reload

    or

    sudo service httpd reload

    The blocker is now active and working so now you can run some simple tests from another linux machine to make sure it's working.


    <img src="

    *TESTING**

    Run the following commands one by one from a terminal on another linux machine against your own domain name.
    substitute yourdomain.com in the examples below with your REAL domain name

    curl -A "googlebot"

    Should respond with 200 OK

    curl -A "80legs"

    curl -A "masscan"

    Should respond with 403 Forbidden

    curl -I -e

    curl -I -e

    Should respond with 403 Forbidden

    The Apache Ultimate Bot Blocker is now WORKING and PROTECTING your web sites !!!


    <img src="

    UPDATING THE APACHE BAD BOT BLOCKER is now easy thanks to the automatic includes for whitelisting your own domain names.

    Updating to the latest is now as simple as:

    sudo wget -O /etc/apache2/custom.d/globalblacklist.conf

    sudo apache2ctl configtest

    sudo service apache2 reload

    And you will be up to date with all your whitelisted domains included automatically for you now.


    AUTO UPDATING WITH CRON:

    See the latest auto updater bash script for Apache 2.2 and 2.4 contributed by Luke Taylor at:

    Relax now and sleep better at night knowing your site is telling all those baddies FORBIDDEN !!!

    <img src=" alt="Apache 2.4 Bad Bot Blocker"/>


    <img src="

    COPY THE GLOBALBLACKLIST.CONF FILE FROM THE REPO
    $APACHE_CONF is generally located at /etc/apache2 or /etc/httpd depending on OS

    Copy the contents of globalblacklist.conf into your $APACHE_CONF/custom.d folder.
    e.g. /etc/apache2/custom.d on Ubuntu/Debian
    /etc/httpd on RHEL/centos
    You need to create this folder.

    The following directions use /etc/apache2 as an example.

    sudo mkdir /etc/apache2/custom.d

    sudo wget -O /etc/apache2/custom.d/globalblacklist.conf

    If your Linux distribution does not have wget you can replace the wget commands using curl as follows:

    curl -sL -o /etc/apache2/custom.d/globalblacklist.conf


    <img src="

    WHITELIST ALL YOUR OWN DOMAIN NAMES AND IP ADDRESSES

    Whitelist all your own domain names and IP addresses. Please note important changes, this is now done using include files so that you do not have to keep reinserting your whitelisted domains and IP addresses every time you update.

    :exclamation: :exclamation: :exclamation: WARNING: Please do NOT ever use 127.0.0.1 as a whitelisted IP address in whitelist-ips.conf it will cause the blocker to stop functioning.

  • copy the whitelist-ips.conf file into that folder
  • sudo wget -O /etc/apache2/custom.d/whitelist-ips.conf

  • copy the whitelist-domains.conf file into the same folder
  • sudo wget -O /etc/apache2/custom.d/whitelist-domains.conf

    Use nano, vim or any other text editor to edit both whitelist-ips.conf and whitelist-domains.conf to include all your own domain names and IP addresses that you want to specifically whitelist from the blocker script.

    When pulling any future updates now you can simply pull the latest globalblacklist.conf file and it will automatically include your whitelisted domains and IP addresses. No more remembering having to do this yourself.


    <img src="

    DOWNLOAD CUSTOM BLACKLIST INCLUDE FILE FOR IP ADDRESS AND IP RANGE BLOCKING

    Blacklist any IP addresses or Ranges you wish to keep out of your servers. Please note important changes, this is now done using include files so that you have full control over what IP addresses and IP Ranges and blocked from your Apache Server.

  • copy the blacklist-ips.conf file into that folder
  • sudo wget -O /etc/apache2/custom.d/blacklist-ips.conf

    Use nano, vim or any other text editor to edit the blacklist-ips.conf file as you like.

    When pulling any future updates now your custom IP blacklist will not be o.


    <img src="

    DOWNLOAD CUSTOM BAD REFERRER WORDS INCLUDE FILE FOR CUSTOMIZED SCANNING OF BAD WORDS

    Scan for any bad referrer words you wish to keep out of your servers. Please note important changes, this is now done using include files so that you have full control over what IP addresses and IP Ranges and blocked from your Apache Server.

  • copy the bad-referrer-words.conf file into that folder
  • sudo wget -O /etc/apache2/custom.d/bad-referrer-words.conf

    Use nano, vim or any other text editor to edit the bad-referrer-words.conf file as you like.

    When pulling any future updates now your custom bad referrer words list will not be o.


    <img src="

    DOWNLOAD CUSTOM BLACKLIST USER-AGENTS INCLUDE FILE FOR CUSTOMIZED BLOCKING OF USER AGENTS

    Allows you to add your own custom list of user agents with this new include file.

  • copy the blacklist-user-agents.conf file into that folder
  • sudo wget -O /etc/apache2/custom.d/blacklist-user-agents.conf

    NOTE: On the Apache Blocker if you want to o any of the whitelisted bots you can add them to this include file and the pre whitelisted bots in the blocker will be o by this include file. So let's say for some "obscure" reason you really do not want any search engines like Googlebot or Bingbot to e or index your site, you add them to your blacklist-user-agents.conf and they will be o from the earlier whitelisting in the blocker. This now gi total control over the blocker without every having to try and modify the globalblacklist.conf file. So now you can customize all your include files and you can still pull the daily updates of globalblacklist.conf and it will not touch any of your custom include files.


    <img src="

    INCLUDE THE GLOBALBLACKLIST.CONF

    Include the globalblacklist.conf file in the beginning of a directory block just after your opening Options statements and before the rest of your host config example below. Remove the "<<<<<< This needs to be added" part

    You can include globalblacklist.conf globally (for all hosts) if you put the following configuration after host configuration.


    <img src="

    TEST YOUR APACHE CONFIGURATION

    Do an Apache2 Config Test

    sudo apache2ctl configtest

    If you get no errors then you followed my instructions so now you can make the blocker go live with a simple.

    sudo service apache2 reload

    or

    sudo service httpd reload

    The blocker is now active and working so now you can run some simple tests from another linux machine to make sure it's working.


    <img src="

    *TESTING**

    Run the following commands one by one from a terminal on another linux machine against your own domain name.
    substitute yourdomain.com in the examples below with your REAL domain name

    curl -A "googlebot"

    Should respond with 200 OK

    curl -A "80legs"

    curl -A "masscan"

    Should respond with 403 Forbidden

    curl -I -e

    curl -I -e

    Should respond with 403 Forbidden

    The Apache Ultimate Bot Blocker is now WORKING and PROTECTING your web sites !!!


    <img src="

    UPDATING THE APACHE BAD BOT BLOCKER is now easy thanks to the automatic includes for whitelisting your own domain names.

    Updating to the latest is now as simple as:

    sudo wget -O /etc/apache2/custom.d/globalblacklist.conf

    sudo apache2ctl configtest

    sudo service apache2 reload

    And you will be up to date with all your whitelisted domains included automatically for you now.


    AUTO UPDATING WITH CRON:

    See the latest auto updater bash script for Apache 2.2 and 2.4 contributed by Luke Taylor at:

    Relax now and sleep better at night knowing your site is telling all those baddies FORBIDDEN !!!


    WHY BLOCK BAD BOTS ?

    <h4 id="define-bad-bots">
    Definition of Bad Bots
    </h4>

    ##### Bad bots are:

  • Bad Referrers

  • Bad User-Agent Strings

  • Spam Referrers

  • Spam Bots and Bad Bots

  • Nuisance or Unwanted Bots

  • Sites Linked to Lucrati, Adware and Ransomware Clickjacking Campaigns

  • scanners

  • Gambling and Porn Web Sites

  • E-mail har

  • Content scrapers

  • Link Ranking Bots

  • Aggressive bots that scrape content

  • Image Hotlinking Sites and Image Thieves

  • Bots or Servers linked to or malware

  • Go sur bots

  • Botnet Attack Networks (Mirai)

  • Known Wordpress Theme Detectors (Updated Regularly)

  • SEO companies that your competitors use to try impro SEO

  • Link Research and Backlink Testing Tools

  • Stopping Google Analytics Ghost Spam

  • Browser Adware and Malware (Yontoo etc)

  • To contribute your own bad referers

    please add them into the

    file and then send a Pull Request (PR).
    All additions will be checked for accuracy before being merged.


    Issues:

    Log any issues regarding incorrect listings on the issues system and they will be in
    and removed if necessary.


    No root access to your Apache server and Unable to run this blocker?

    2.2017.03 introduced .htaccess of the spam referrer for those unable to run the full Apache Bad Bot Blocker look inside the folder in this repo for instructions.


    Help Support This Project

    <img src=" alt="Buy me Coffee" width="300"/>

    Bots attempt to make themselves look like other software or web sites by disguising their user agent.
    Their user agent names may look harmless, perfectly legitimate even.

    For example, "^Java" but according to Project Honeypot, it's actually one of the most dangerous BUT a lot of
    legitimate bots out there have "Java" in their user agent string so the approach taken by many to block is
    not only ignorant but also blocking out very legitimate crawlers including some of Google's and Bing's.

    Welcome to the Ultimate Bad Bot and Referer Blocker for Apache Web Server 2.4.x


    THE METHOD IN MY MADNESS

    This bot blocker list is designed to be an Apache include file and uses the apache
    BrowserMatchNoCase directive. This way the .conf file can be loaded
    once into memory by Apache and be a to all web sites that you operate.
    You simply need to use an Include statement (example below)

    I personally find the BrowserMatchNoCase Directive to be more accurate than using
    SetEn User-Agent because BrowserMatchNoCase is not case sensitive and
    from my tests is more accurate that SetEn.

    My method also results in a cleaner file to maintain that requires no complex regex
    other than the Name of the Bot. BrowserMatchNoCase will do the rest. You can use Regex
    if you like but it's NOT needed and I proved it by testing with the Chrome extension
    User-Agent Switcher for Chrome.

  • The user agent "Aboundex" is found without using "^Aboundex" ... much simpler for anyone

  • to maintain than other lists using Regex.

  • Likewise it is unnecessary to have "Download\ Demon" instead you now just have

  • "Download Demon".

  • Additionally if we have a rule, like below "Image Stripper" and a bot

  • decides to change its User-Agent string to "NOT Image Stripper I Promise" he is picked
    up regardless and blocked immediately.

    I only capitalise bot names in my list for ease of reading and maintenance, remember its
    not case-sensitive so will catch any combination like "Bot" "bOt" and "bOT".

    So for those of you who SUCK with Regex my Apache Bad Bot Blocker is your saviour !!!


    IT'S CENTRALISED:

    The beauty of this is that it is one central file used by all your web sites.
    This means there is only place to make amendments ie. adding new bots that you
    discover in your log files. Any changes are applied immediately to all sites after
    a simple "sudo service apache2 reload".


    IT IS TINY AND LIGHTWEIGHT

    The file is tiny in size. At the time of this writing and the first public commit of this
    the file size including all the commenting "which Apache ignores" is a mere 212 kb in size.
    It is so lightweight that Apache does not even know it's there. It already contains thousands
    of entries.


    NO COMPLICATED REWRITE RULES:

    This also does not use ReWrite Rules and Conditions which also put o onto
    Apache, this sends a simple 403 Forbidden Response and DONE !!!


    APACHE WILL LOVE YOU FOR IT !!!!

    This approach also makes this very lightweight on Apache the usual .htaccess
    approach that many choose. The .htaccess approach is a little clumsy because every site
    has to have its own one and every time someone requests your web site the .htaccess gets
    hit and has to be checked, this is unnecessary o for Apache and not to mention
    a pain when it comes to maintenance and updating your ruleset.

    .htaccess just sucks full stop. One reason after 9 years I ha e to
    Nginx but will continue to keep this file updated as it is solid and it works.


    FEATURES OF THE APACHE ULTIMATE BAD BOT BLOCKER:

  • Extensi of Bad and Known Bad Bots and Scrapers (updated almost daily)

  • Blocking of Spam Referrer Domains and Web Sites

  • Blocking of SEO data collection companies like Semalt.com, Builtwith.com, WooRank.com and many others (updated regularly)

  • Blocking of clickjacking Sites linked to Adware, Malware and Ransomware

  • Blocking of Porn and Gambling Web Sites who use Lucrative Ways to Earn Money through Serving Ads by hopping off your domain names and web sites.

  • Blocking of Bad Domains and IP's that you cannot even see in your Nginx Logs. Thanks to the Content Security Policy (CSP) on all my SSL sites I can see things trying to pull resources off my sites before they even get to Nginx and get blocked by the CSP.

  • Anti DDOS Filter and Rate Limiting of Agressive Bots

  • Alphabetically ordered for easier maintenance (Pull Requests Welcomed)

  • Commented sections of certain important bots to be sure of before blocking

  • Includes the IP range of Cy who are known to ignore robots.txt rules

  • and snoop around all over the Internet.
  • Whitelisting of Google, Bing and Cloudflare IP Ranges

  • Whitelisting of your own IP Ranges that you want to avoid blocking by mistake.

  • Ability to add other IP ranges and IP blocks that you want to block out.

  • If its out there and it's bad it's already in here and BLOCKED !!

  • UNDERSTANDS PUNYCODE / IDN DOMAIN NAMES


    A lot of lists out there put funny domains into their hosts file. Your hosts file and DNS will not understand this. This list uses con domains which are in the correct DNS format to be understood by any operating system. Avoid using lists that do not put the correctly formatted domain structure into their lists.

    For instance
    The domain:

    lifehacĸer.com (note the K)

    actually translates to:

    xn--lifehacer-1rb.com

    You can do an nslookup on any operating system and it will resol.

    nslookup xn--lifehacer-1rb.com

  • Look at: for more info on this.

  • WARNING:

    Please understand why you are using the Apache Bad Bot Blocker before you even use this.
    Please do not simply copy and paste without understanding what this is doing.
    Do not become a copy and paste Linux "Guru", learn things properly before you use them
    and always test e you do one step at a time.


    MONITOR WHAT YOU ARE DOING:

    MAKE SURE to monitor your web site logs after implementing this. I suggest you first
    load this into one site and monitor it for any possible false positi putting
    this into production on all your web sites.

    Also monitor your logs daily for new bad referers and user-agent strings that you
    want to block. Your best source of adding to this list is your own server logs, not mine.


    HOW TO MONITOR YOUR APACHE LOGS DAILY (The Easy Way):

    With great thanks and appreciation to

    To monitor your top referer's for a web site's log file's on a daily basis use the following simple
    cron jobs which will email you a list of top referer's / user agents every morning from a particular web site's log
    files. This is an example for just one cron job for one site. Set up multiple one's for each one you
    want to monitor. Here is a cron that runs at 8am every morning and emails me the stripped down log of
    referers. When I say stripped down, the domain of the site and other referers like Google and Bing are
    stripped from the results. Of course you must change the log file name, domain name and your email address in
    the examples below. The second cron for collecting User agents does not do any stripping out of any referers but you
    can add that functionality if you like copying the awk statement !~ from the first example.

    ##### Cron for Monitoring Daily Referers on Apache

    00 08 * * * tail -10000 /var/log/apache/mydomain-access.log | awk '$11 !~ /google|bing|yahoo|yandex|mywebsite.com/' | awk '{print $11}' | tr -d '"' | sort | uniq -c | sort -rn | head -1000 | mail -s "Top 1000 Referers for Mydomain.com"

    ##### Cron for Monitoring Daily User Agents on Apache

    00 08 * * * tail -50000 /var/log/apache/mydomain-access.log | awk '{print $12}' | tr -d '"' | sort | uniq -c | sort -rn | head -1000 | mail -s "Top 1000 Agents for Mydomain.com"


    EASY CONFIGURATION INSTRUCTIONS FOR STOPPING GOOGLE ANALYTICS "GHOST" SPAM

    Simply using the Apache blocker does not stop Google Analytics ghost referral spam because they are hitting Analytics directly and not always necessarily touching your website.

    You should use regex filters in Analytics to prevent ghost referral spam.

    For this there are several google-exclude-0*.txt files which have been created for you and they are updated at the same time when the Nginx Blocker is updated. As the list grows there will be more exclude files created.

    To stop Ghost Spam on On Analytics

    Follow the step by step instructions below to add these google-exclude files as segments to your web site.

    <table style="width:100%;margin:0;">
    <tr>
    <td align="left"><img src=" alt="Google Analytics - Adding Segments to Stop Ghost Spam"/></td>
    </tr>
    <tr>
    <td align="left"><img src=" alt="Google Analytics - Adding Segments to Stop Ghost Spam"/></td>
    </tr>
    <tr>
    <td align="left"><img src=" alt="Google Analytics - Adding Segments to Stop Ghost Spam"/></td>
    </tr>
    <tr>
    <td align="left"><img src=" alt="Google Analytics - Adding Segments to Stop Ghost Spam"/></td>
    </tr>
    <tr>
    <td align="left"><img src=" alt="Google Analytics - Adding Segments to Stop Ghost Spam"/></td>
    </tr>
    <tr>
    <td align="left"><img src=" alt="Google Analytics - Adding Segments to Stop Ghost Spam"/></td>
    </tr>
    <tr>
    <td align="left"><img src=" alt="Google Analytics - Adding Segments to Stop Ghost Spam"/></td>
    </tr>
    </table>


    Blocking Spam Referrer Domains Using Google Webmaster Tools (How to use google-disavow.txt file)

    I ha the creation of a Google Disavow text file called google-disavow.txt. This file can be used in Google's Webmaster Tools to block all these domains out as spammy or bad links. Use with caution.


    Blocking Agressive Bots at Firewall Le Fail2Ban

    I ha a custom Fail2Ban filter and action that I ha which monitors your Apache logs for bots that generate
    a large number of 403 errors. This custom jail for Fail2Ban will scan logs over a 1 week period and ban the offender for 24 hours.
    It helps a great deal in keeping out some repeat offenders and pre them from filling up your log files with 403 errors.
    See the Fail2Ban folder for instructions on configuring this great add on for the Apache Bad Bot Blocker.

    Help Support This Project

    <img src=" alt="Buy me Coffee" width="300"/>


    Also Checkout The Big List of Hacked Malware Web Sites

    This repository contains a list of all web sites I come across that are hacked with malware.
    Most site owners are unaware their sites have been hacked and are being used to plant malware.

    Check it out at:


    Some other free projects

















  • Acknowledgements & Contributors:

    Many parts of the generator scripts and code running behind this project have been adapted from multiple sources. In fact it's so hard to mention e but here are a few key people whose little snippets of code ha me introduce new features all the time. Show them some love and check out some of their projects too

  • Luke Taylor (Impro to the install and update scripts and fixing paths for Apache 2.2, 2.4 and CentOS )

  • Konstantin Goretzki (Impro on Fail2Ban Filter)

  • Ste Hartog

  • Nissar Chababy - (Excellent script for checking ACTI and EXPIRED Domain Names)

  • Marius Voila

  • Cătălin Mariș

  • deformhead

  • bluedragonz

  • Alexander

  • Ste

  • Fail2Ban -

  • Sir Athos from StackO - (help with Tra Tagging and Committing)

  • StackO - (bash scripts from hundreds of questions and answers)

  • SuperUser - (snippets from questions and answers)
  • If you believe your name should be here, drop me a line.


    INTO PHOTOGRAPHY?

    Come drop by and visit me at mitchellkrog.com or Facebook or Follow Me on Twitter <a href=' src=' alt='Follow '></a>


    Help Support This Project

    <img src=" alt="Buy me Coffee" width="300"/>

    <img src="

    Update Notification System

    Please subscribe your email address to the mailing list at
    or simply send a blank email to to subscribe.
    Please make sure you are subscribed to notifications to be notified when the blocker is updated and also to be notified when any important or mission critical changes take place.

    Also follow me on twitter <a href=' src=' alt='Follow '></a>


    MIT License

    Copyright (c) 2017 Mitchell Krog -


    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The abo notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.

    项目信息

    开发语言:C

    Star 数:984

    技术要点

    该项目属于安全软件方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Apache Block Bad Bots, (Referer) Spam Referrer Blocker, Vulnerability Scanners, Malware, Adware, Ransomware, Malicious Sites, Wordpress Theme Detectors and Fail2Ban Jail for Repeat Offenders展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。

    从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。

    使用与学习建议

    1. 下载源码压缩包,解压到本地环境。

    2. 根据项目类型准备对应的运行环境与依赖。

    3. 按照 README 中的步骤完成配置与部署。

    4. 在隔离的测试环境中运行验证,避免影响生产系统。

    免责声明

    本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。

    资源标题apache-ultimate-bad-bot-blocker - Apache Block Bad Bots, (Referer) Spam Referrer Blo
    所属分类安全软件
    发布作者admin
    发布时间2026-10-05 22:34:39
    下载权限 免费下载
    附件数量2 个下载链接
    浏览次数231
    讨论数量0
    主题状态正常讨论中

    本资源免费,登录后即可在本页「下载链接」区域获取全部附件。

    请在评论区留言说明具体链接,或联系作者补档。楼主更新后本页会同步最新的下载地址。

    请先阅读正文中的授权说明;未注明的默认仅限站内学习交流,禁止直接搬运到其他站点二次售卖。
    还没有讨论,快来抢沙发~
    登录 后才能参与讨论
    下载链接
    会员才能下载
    登录后开通会员
    同分类推荐
    暂无同类资源
    免费登录即可下载
    查看会员
    放大预览

    © 2026 剑庭安 - 网站开发定制 SEO 优化蜘蛛池代做 在线看手相算命. 保留所有权利。

    Powered by 酷像SEOv3.0

    网站地图 Sitemap.xml
    首页 全部分类 黑客安全 逆向|反编译 精品源码 站长工具自助开通会员其他资源SEO工具站群源码泛程序蜘蛛模板蜘蛛池外链工具创意乐园 搜索 会员服务 登录 注册