Compare commits

...

2 commits

19 changed files with 24 additions and 24 deletions

View file

@ -1,5 +1,5 @@
--- ---
title: "Block and Filter Spam Requests With User-Agents in Nginx" title: "Block and Filter Spam Requests With User-Agents in NGINX"
date: 2024-09-05T16:58:04+03:00 date: 2024-09-05T16:58:04+03:00
draft: false draft: false
--- ---

View file

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" class="main-background-image"> <html lang="en" class="main-background-image">
<head> <head>
<title>Block and Filter Spam Requests With User-Agents in Nginx | vodoraslo&#39;s blog</title> <title>Block and Filter Spam Requests With User-Agents in NGINX | vodoraslo&#39;s blog</title>
<link rel="canonical" href="https://vodoraslo.xyz/"> <link rel="canonical" href="https://vodoraslo.xyz/">
<link rel='alternate' type='application/rss+xml' title="vodoraslo&#39;s blog RSS" href='/index.xml'> <link rel='alternate' type='application/rss+xml' title="vodoraslo&#39;s blog RSS" href='/index.xml'>
<link rel='stylesheet' type='text/css' href='/style.css?v=1.0.0.12'> <link rel='stylesheet' type='text/css' href='/style.css?v=1.0.0.12'>
@ -15,15 +15,15 @@ Adapt the following for your use case and simply place it in every nginx.conf th
<div class="main-background-image"> <div class="main-background-image">
<body> <body>
<main> <main>
<header><h1 style="margin-top: 0%; padding-top: 0.5em;" id="tag_Block and Filter Spam Requests With User-Agents in Nginx">Block and Filter Spam Requests With User-Agents in Nginx</h1></header> <header><h1 style="margin-top: 0%; padding-top: 0.5em;" id="tag_Block and Filter Spam Requests With User-Agents in NGINX">Block and Filter Spam Requests With User-Agents in NGINX</h1></header>
<hr style="color:var(--strong);background-color: var(--strong); border-color: var(--strong);"><article style="padding: 0% 2.5% 0% 2.5%;"> <hr style="color:var(--strong);background-color: var(--strong); border-color: var(--strong);"><article style="padding: 0% 2.5% 0% 2.5%;">
<div class="breadcrumbs"> <div class="breadcrumbs">
<nav><a href="/">vodoraslo</a> /&nbsp;<a href="/articles/">Articles</a> /&nbsp;Block and Filter Spam Requests With User-Agents in Nginx</nav> <nav><a href="/">vodoraslo</a> /&nbsp;<a href="/articles/">Articles</a> /&nbsp;Block and Filter Spam Requests With User-Agents in NGINX</nav>
</div> </div>
<small><em><p style="color: var(--muted_text);">作成日: <time datetime="2024-09-05T16:58:04&#43;03:00" style="color: var(--muted_text);">2024年9月5日 (木)</time>, 最終更新日: <time datetime="2024-09-05T17:22:43&#43;03:00" style="color: var(--muted_text);">2024年9月5日 (木)</time> </p></em></small> <small><em><p style="color: var(--muted_text);">作成日: <time datetime="2024-09-05T16:58:04&#43;03:00" style="color: var(--muted_text);">2024年9月5日 (木)</time>, 最終更新日: <time datetime="2024-09-05T21:13:08&#43;03:00" style="color: var(--muted_text);">2024年9月5日 (木)</time> </p></em></small>
<div class="post-content"><p>My server has been getting bussyblasted by spam requests from bots and other subhumans and I figured out a way to block them with NGINX.</p> <div class="post-content"><p>My server has been getting bussyblasted by spam requests from bots and other subhumans and I figured out a way to block them with NGINX.</p>
<p>Adapt the following for your use case and simply place it in every nginx.conf that is <code>ln -s</code> linked to your <code>/etc/nginx/sites-enabled</code> (<em>it should be under the <code>listen 443</code> server block if you use certbot. Don&rsquo;t add it under <code>location</code> it should be on the same level as <code>listen [::]:443 ssl;</code></em>)</p> <p>Adapt the following for your use case and simply place it in every nginx.conf that is <code>ln -s</code> linked to your <code>/etc/nginx/sites-enabled</code> (<em>it should be under the <code>listen 443</code> server block if you use certbot. Don&rsquo;t add it under <code>location</code> it should be on the same level as <code>listen [::]:443 ssl;</code></em>)</p>

View file

@ -76,7 +76,7 @@ That is no more! I&rsquo;m sick of doing it and I don&rsquo;t know how I just re
<hr style="color:var(--strong); margin: 0; background-color: var(--strong); border-color: var(--strong);"> <hr style="color:var(--strong); margin: 0; background-color: var(--strong); border-color: var(--strong);">
<div id="nextprev"> <div id="nextprev">
<a href="/articles/blog/hugo-drafts-showing-in-production/"><div id="prevart"><i>Previous:</i><br>Hugo: Drafts Showing in Production</div></a> <a href="/articles/blog/hugo-drafts-showing-in-production/"><div id="prevart"><i>Previous:</i><br>Hugo: Drafts Showing in Production</div></a>
<a href="/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/"><div id="nextart"><i>Next:</i><br>Block and Filter Spam Requests With User-Agents in Nginx</div></a> <a href="/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/"><div id="nextart"><i>Next:</i><br>Block and Filter Spam Requests With User-Agents in NGINX</div></a>
</div> </div>
<div ><div style="clear:both" class=taglist> <div ><div style="clear:both" class=taglist>
Tags: [<a id="tag_blog" href="https://vodoraslo.xyz/tags/blog">Blog</a>] Tags: [<a id="tag_blog" href="https://vodoraslo.xyz/tags/blog">Blog</a>]

View file

@ -89,7 +89,7 @@ Create a username and password for authentication (or more than 1 user) First:"/
<br> <br>
<hr style="color:var(--strong); margin: 0; background-color: var(--strong); border-color: var(--strong);"> <hr style="color:var(--strong); margin: 0; background-color: var(--strong); border-color: var(--strong);">
<div id="nextprev"> <div id="nextprev">
<a href="/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/"><div id="prevart"><i>Previous:</i><br>Block and Filter Spam Requests With User-Agents in Nginx</div></a> <a href="/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/"><div id="prevart"><i>Previous:</i><br>Block and Filter Spam Requests With User-Agents in NGINX</div></a>
</div> </div>
<div > <div >
</div> </div>

View file

@ -39,7 +39,7 @@ blog (8) hackbook (59) library (74) ted-kaczynski (15) updates (3) "/>
</div> </div>
<ul> <ul>
<li class="index-links"><time datetime="2024-09-05T17:05:07&#43;03:00">2024 Sep 05</time> &ndash; <a href="/articles/blog/restrict-unwanted-access-with-http-basic-auth-nginx-and-apache/">Restrict Unwanted Access With HTTP Basic Authentication - NGINX and Apache</a></li> <li class="index-links"><time datetime="2024-09-05T17:05:07&#43;03:00">2024 Sep 05</time> &ndash; <a href="/articles/blog/restrict-unwanted-access-with-http-basic-auth-nginx-and-apache/">Restrict Unwanted Access With HTTP Basic Authentication - NGINX and Apache</a></li>
<li class="index-links"><time datetime="2024-09-05T16:58:04&#43;03:00">2024 Sep 05</time> &ndash; <a href="/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/">Block and Filter Spam Requests With User-Agents in Nginx</a></li> <li class="index-links"><time datetime="2024-09-05T16:58:04&#43;03:00">2024 Sep 05</time> &ndash; <a href="/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/">Block and Filter Spam Requests With User-Agents in NGINX</a></li>
<li class="index-links"><time datetime="2024-08-31T16:12:49&#43;03:00">2024 Aug 31</time> &ndash; <a href="/articles/blog/neater-footnotes-in-hugo-using-the-details-html-tag/">Neater Footnotes in Hugo Using the &lt;details&gt; HTML Tag</a></li> <li class="index-links"><time datetime="2024-08-31T16:12:49&#43;03:00">2024 Aug 31</time> &ndash; <a href="/articles/blog/neater-footnotes-in-hugo-using-the-details-html-tag/">Neater Footnotes in Hugo Using the &lt;details&gt; HTML Tag</a></li>
<li class="index-links"><time datetime="2024-03-17T17:53:39&#43;03:00">2024 Mar 17</time> &ndash; <a href="/articles/blog/hugo-drafts-showing-in-production/">Hugo: Drafts Showing in Production</a></li> <li class="index-links"><time datetime="2024-03-17T17:53:39&#43;03:00">2024 Mar 17</time> &ndash; <a href="/articles/blog/hugo-drafts-showing-in-production/">Hugo: Drafts Showing in Production</a></li>
<li class="index-links"><time datetime="2024-02-27T17:04:59&#43;03:00">2024 Feb 27</time> &ndash; <a href="/articles/blog/2024-goals/">2024 Goals and Aspirations</a></li> <li class="index-links"><time datetime="2024-02-27T17:04:59&#43;03:00">2024 Feb 27</time> &ndash; <a href="/articles/blog/2024-goals/">2024 Goals and Aspirations</a></li>

View file

@ -75,7 +75,7 @@
</item> </item>
<item> <item>
<title>Block and Filter Spam Requests With User-Agents in Nginx</title> <title>Block and Filter Spam Requests With User-Agents in NGINX</title>
<link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link> <link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link>
<pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate> <pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate>

View file

@ -40,10 +40,10 @@
more about Restrict Unwanted Access With HTTP Basic Authentication - NGINX and Apache</a> <em> (1 minute read).</em> </li> more about Restrict Unwanted Access With HTTP Basic Authentication - NGINX and Apache</a> <em> (1 minute read).</em> </li>
<li><time <li><time
datetime="2024-09-05T16:58:04&#43;03:00">2024 Sep 05</time> &ndash; datetime="2024-09-05T16:58:04&#43;03:00">2024 Sep 05</time> &ndash;
<a href="/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/" aria-label="Block and Filter Spam Requests With User-Agents in Nginx My server has been getting bussyblasted by spam requests from bots and … ... Click to Read more about Block and Filter Spam Requests With User-Agents in Nginx"><b class="white_span">Block and Filter Spam Requests With User-Agents in Nginx</b></a> - <span <a href="/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/" aria-label="Block and Filter Spam Requests With User-Agents in NGINX My server has been getting bussyblasted by spam requests from bots and … ... Click to Read more about Block and Filter Spam Requests With User-Agents in NGINX"><b class="white_span">Block and Filter Spam Requests With User-Agents in NGINX</b></a> - <span
class="muted_text">My server has been getting bussyblasted by spam requests from bots and other subhumans and I figured out a way to block them with NGINX. class="muted_text">My server has been getting bussyblasted by spam requests from bots and other subhumans and I figured out a way to block them with NGINX.
Adapt the …</span> <a href="/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/" aria-label="Block and Filter Spam Requests With User-Agents in Nginx My server has been getting bussyblasted by spam requests from bots and … ... Click to Read more about Block and Filter Spam Requests With User-Agents in Nginx" class="read_more_recent_posts" style="box-shadow: 0 1px 0;">Read Adapt the …</span> <a href="/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/" aria-label="Block and Filter Spam Requests With User-Agents in NGINX My server has been getting bussyblasted by spam requests from bots and … ... Click to Read more about Block and Filter Spam Requests With User-Agents in NGINX" class="read_more_recent_posts" style="box-shadow: 0 1px 0;">Read
more about Block and Filter Spam Requests With User-Agents in Nginx</a> <em> (1 minute read).</em> </li> more about Block and Filter Spam Requests With User-Agents in NGINX</a> <em> (1 minute read).</em> </li>
<li><time <li><time
datetime="2024-08-31T16:12:49&#43;03:00">2024 Aug 31</time> &ndash; datetime="2024-08-31T16:12:49&#43;03:00">2024 Aug 31</time> &ndash;
<a href="/articles/blog/neater-footnotes-in-hugo-using-the-details-html-tag/" aria-label="Neater Footnotes in Hugo Using the &lt;details&gt; HTML Tag Hugo currently (v133) provides no way for me to choose where to place my … ... Click to Read more about Neater Footnotes in Hugo Using the &lt;details&gt; HTML Tag"><b class="white_span">Neater Footnotes in Hugo Using the &lt;details&gt; HTML Tag</b></a> - <span <a href="/articles/blog/neater-footnotes-in-hugo-using-the-details-html-tag/" aria-label="Neater Footnotes in Hugo Using the &lt;details&gt; HTML Tag Hugo currently (v133) provides no way for me to choose where to place my … ... Click to Read more about Neater Footnotes in Hugo Using the &lt;details&gt; HTML Tag"><b class="white_span">Neater Footnotes in Hugo Using the &lt;details&gt; HTML Tag</b></a> - <span

View file

@ -75,7 +75,7 @@
</item> </item>
<item> <item>
<title>Block and Filter Spam Requests With User-Agents in Nginx</title> <title>Block and Filter Spam Requests With User-Agents in NGINX</title>
<link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link> <link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link>
<pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate> <pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate>

View file

@ -76,7 +76,7 @@
</item> </item>
<item> <item>
<title>Block and Filter Spam Requests With User-Agents in Nginx</title> <title>Block and Filter Spam Requests With User-Agents in NGINX</title>
<link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link> <link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link>
<pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate> <pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate>

View file

@ -75,7 +75,7 @@
</item> </item>
<item> <item>
<title>Block and Filter Spam Requests With User-Agents in Nginx</title> <title>Block and Filter Spam Requests With User-Agents in NGINX</title>
<link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link> <link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link>
<pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate> <pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate>

View file

@ -76,7 +76,7 @@
</item> </item>
<item> <item>
<title>Block and Filter Spam Requests With User-Agents in Nginx</title> <title>Block and Filter Spam Requests With User-Agents in NGINX</title>
<link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link> <link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link>
<pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate> <pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate>

View file

@ -6,7 +6,7 @@
<lastmod>2024-09-05T17:22:43+03:00</lastmod> <lastmod>2024-09-05T17:22:43+03:00</lastmod>
</url><url> </url><url>
<loc>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</loc> <loc>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</loc>
<lastmod>2024-09-05T17:22:43+03:00</lastmod> <lastmod>2024-09-05T21:13:08+03:00</lastmod>
</url><url> </url><url>
<loc>https://vodoraslo.xyz/articles/blog/neater-footnotes-in-hugo-using-the-details-html-tag/</loc> <loc>https://vodoraslo.xyz/articles/blog/neater-footnotes-in-hugo-using-the-details-html-tag/</loc>
<lastmod>2024-08-31T17:06:20+03:00</lastmod> <lastmod>2024-08-31T17:06:20+03:00</lastmod>

View file

@ -76,7 +76,7 @@
</item> </item>
<item> <item>
<title>Block and Filter Spam Requests With User-Agents in Nginx</title> <title>Block and Filter Spam Requests With User-Agents in NGINX</title>
<link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link> <link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link>
<pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate> <pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate>

View file

@ -76,7 +76,7 @@
</item> </item>
<item> <item>
<title>Block and Filter Spam Requests With User-Agents in Nginx</title> <title>Block and Filter Spam Requests With User-Agents in NGINX</title>
<link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link> <link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link>
<pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate> <pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate>

View file

@ -76,7 +76,7 @@
</item> </item>
<item> <item>
<title>Block and Filter Spam Requests With User-Agents in Nginx</title> <title>Block and Filter Spam Requests With User-Agents in NGINX</title>
<link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link> <link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link>
<pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate> <pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate>

View file

@ -76,7 +76,7 @@
</item> </item>
<item> <item>
<title>Block and Filter Spam Requests With User-Agents in Nginx</title> <title>Block and Filter Spam Requests With User-Agents in NGINX</title>
<link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link> <link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link>
<pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate> <pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate>

View file

@ -76,7 +76,7 @@
</item> </item>
<item> <item>
<title>Block and Filter Spam Requests With User-Agents in Nginx</title> <title>Block and Filter Spam Requests With User-Agents in NGINX</title>
<link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link> <link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link>
<pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate> <pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate>

View file

@ -76,7 +76,7 @@
</item> </item>
<item> <item>
<title>Block and Filter Spam Requests With User-Agents in Nginx</title> <title>Block and Filter Spam Requests With User-Agents in NGINX</title>
<link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link> <link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link>
<pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate> <pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate>

View file

@ -76,7 +76,7 @@
</item> </item>
<item> <item>
<title>Block and Filter Spam Requests With User-Agents in Nginx</title> <title>Block and Filter Spam Requests With User-Agents in NGINX</title>
<link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link> <link>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</link>
<pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate> <pubDate>Thu, 05 Sep 2024 16:58:04 +0300</pubDate>