Skip to content

Commit

Permalink
closes #135 and #136
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevie-Ray committed Sep 18, 2023
1 parent 40b8597 commit 48b054b
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 27 deletions.
6 changes: 1 addition & 5 deletions .htaccess
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://github.com/Stevie-Ray/referrer-spam-blocker
# Updated 2023-09-18 19:35:29
# Updated 2023-09-18 19:49:00

<IfModule mod_rewrite.c>

Expand Down Expand Up @@ -128,7 +128,6 @@ RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*adcash\.com.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*addblueoff\.com\.ua.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*adelachrist\.top.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*adelly\.bg.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*adf\.ly.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*adpostmalta\.com.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*adrenalinebot\.net.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*adrenalinebot\.ru.*$ [NC,OR]
Expand Down Expand Up @@ -3605,7 +3604,6 @@ RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*stylecaster\.top.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*styro\.ru.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*su1ufa\.ru.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*success\-seo\.com.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*suche\.t\-online\.de.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*suckoutlet\.xyz.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*sudachitravel\.com.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http(s)?://(www.)?.*sugarkun\.com.*$ [NC,OR]
Expand Down Expand Up @@ -4568,7 +4566,6 @@ SetEnvIfNoCase Referer adcash\.com spambot=yes
SetEnvIfNoCase Referer addblueoff\.com\.ua spambot=yes
SetEnvIfNoCase Referer adelachrist\.top spambot=yes
SetEnvIfNoCase Referer adelly\.bg spambot=yes
SetEnvIfNoCase Referer adf\.ly spambot=yes
SetEnvIfNoCase Referer adpostmalta\.com spambot=yes
SetEnvIfNoCase Referer adrenalinebot\.net spambot=yes
SetEnvIfNoCase Referer adrenalinebot\.ru spambot=yes
Expand Down Expand Up @@ -8045,7 +8042,6 @@ SetEnvIfNoCase Referer stylecaster\.top spambot=yes
SetEnvIfNoCase Referer styro\.ru spambot=yes
SetEnvIfNoCase Referer su1ufa\.ru spambot=yes
SetEnvIfNoCase Referer success\-seo\.com spambot=yes
SetEnvIfNoCase Referer suche\.t\-online\.de spambot=yes
SetEnvIfNoCase Referer suckoutlet\.xyz spambot=yes
SetEnvIfNoCase Referer sudachitravel\.com spambot=yes
SetEnvIfNoCase Referer sugarkun\.com spambot=yes
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ Include the file `referral_spam.res` into your vassal .ini configuration file:
ini = referral_spam.res:blacklist_spam
```

## HAProxy: referral-spam.haproxy

Use it in your HAProxy config by adding all domains.txt items, in any frontend, listen or backend block:

```
acl spam_referer hdr_sub(referer) -i -f /etc/haproxy/referral-spam.haproxy
http-request deny if spam_referer
```

## Options for Google Analytics 'ghost' spam

The above methods don't stop the Google Analytics **ghost** referral spam (because they are hitting Analytics directly and don't touching your website). You should use filters in Analytics to prevent **ghost** referral spam and hide spam form the **past**.
Expand Down
2 changes: 1 addition & 1 deletion google-exclude-1.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion google-exclude-2.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion google-exclude-3.txt

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions referral-spam.caddy
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://github.com/Stevie-Ray/referrer-spam-blocker
# Updated 2023-09-18 19:35:29
# Updated 2023-09-18 19:49:00
#
# Move this file next to your Caddy config file given through -conf, and include it by doing:
#
Expand Down Expand Up @@ -132,7 +132,6 @@ redir 444 {
if {>Referer} is addblueoff.com.ua
if {>Referer} is adelachrist.top
if {>Referer} is adelly.bg
if {>Referer} is adf.ly
if {>Referer} is adpostmalta.com
if {>Referer} is adrenalinebot.net
if {>Referer} is adrenalinebot.ru
Expand Down Expand Up @@ -3609,7 +3608,6 @@ redir 444 {
if {>Referer} is styro.ru
if {>Referer} is su1ufa.ru
if {>Referer} is success-seo.com
if {>Referer} is suche.t-online.de
if {>Referer} is suckoutlet.xyz
if {>Referer} is sudachitravel.com
if {>Referer} is sugarkun.com
Expand Down
4 changes: 2 additions & 2 deletions referral-spam.caddy2

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions referral-spam.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://github.com/Stevie-Ray/referrer-spam-blocker
# Updated 2023-09-18 19:35:29
# Updated 2023-09-18 19:49:00
#
# /etc/nginx/referral-spam.conf
#
Expand Down Expand Up @@ -141,7 +141,6 @@ map $http_referer $bad_referer {
"~*addblueoff\.com\.ua" 1;
"~*adelachrist\.top" 1;
"~*adelly\.bg" 1;
"~*adf\.ly" 1;
"~*adpostmalta\.com" 1;
"~*adrenalinebot\.net" 1;
"~*adrenalinebot\.ru" 1;
Expand Down Expand Up @@ -3618,7 +3617,6 @@ map $http_referer $bad_referer {
"~*styro\.ru" 1;
"~*su1ufa\.ru" 1;
"~*success\-seo\.com" 1;
"~*suche\.t\-online\.de" 1;
"~*suckoutlet\.xyz" 1;
"~*sudachitravel\.com" 1;
"~*sugarkun\.com" 1;
Expand Down
4 changes: 1 addition & 3 deletions referral-spam.vcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://github.com/Stevie-Ray/referrer-spam-blocker
# Updated 2023-09-18 19:35:29
# Updated 2023-09-18 19:49:00
sub block_referral_spam {
if (
req.http.Referer ~ "(?i)0\-0\.fr" ||
Expand Down Expand Up @@ -125,7 +125,6 @@ sub block_referral_spam {
req.http.Referer ~ "(?i)addblueoff\.com\.ua" ||
req.http.Referer ~ "(?i)adelachrist\.top" ||
req.http.Referer ~ "(?i)adelly\.bg" ||
req.http.Referer ~ "(?i)adf\.ly" ||
req.http.Referer ~ "(?i)adpostmalta\.com" ||
req.http.Referer ~ "(?i)adrenalinebot\.net" ||
req.http.Referer ~ "(?i)adrenalinebot\.ru" ||
Expand Down Expand Up @@ -3602,7 +3601,6 @@ sub block_referral_spam {
req.http.Referer ~ "(?i)styro\.ru" ||
req.http.Referer ~ "(?i)su1ufa\.ru" ||
req.http.Referer ~ "(?i)success\-seo\.com" ||
req.http.Referer ~ "(?i)suche\.t\-online\.de" ||
req.http.Referer ~ "(?i)suckoutlet\.xyz" ||
req.http.Referer ~ "(?i)sudachitravel\.com" ||
req.http.Referer ~ "(?i)sugarkun\.com" ||
Expand Down
4 changes: 1 addition & 3 deletions referral_spam.res
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://github.com/Stevie-Ray/referrer-spam-blocker
# Updated 2023-09-18 19:35:29
# Updated 2023-09-18 19:49:00
#
# Put referral-spam.res in /path/to/vassals, then include it from within /path/to/vassals/vassal.ini:
#
Expand Down Expand Up @@ -129,7 +129,6 @@ route-referer = (?i)adcash\.com break:403 Forbidden
route-referer = (?i)addblueoff\.com\.ua break:403 Forbidden
route-referer = (?i)adelachrist\.top break:403 Forbidden
route-referer = (?i)adelly\.bg break:403 Forbidden
route-referer = (?i)adf\.ly break:403 Forbidden
route-referer = (?i)adpostmalta\.com break:403 Forbidden
route-referer = (?i)adrenalinebot\.net break:403 Forbidden
route-referer = (?i)adrenalinebot\.ru break:403 Forbidden
Expand Down Expand Up @@ -3606,7 +3605,6 @@ route-referer = (?i)stylecaster\.top break:403 Forbidden
route-referer = (?i)styro\.ru break:403 Forbidden
route-referer = (?i)su1ufa\.ru break:403 Forbidden
route-referer = (?i)success\-seo\.com break:403 Forbidden
route-referer = (?i)suche\.t\-online\.de break:403 Forbidden
route-referer = (?i)suckoutlet\.xyz break:403 Forbidden
route-referer = (?i)sudachitravel\.com break:403 Forbidden
route-referer = (?i)sugarkun\.com break:403 Forbidden
Expand Down
2 changes: 0 additions & 2 deletions src/domains.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ adcash.com
addblueoff.com.ua
adelachrist.top
adelly.bg
adf.ly
adpostmalta.com
adrenalinebot.net
adrenalinebot.ru
Expand Down Expand Up @@ -3598,7 +3597,6 @@ stylecaster.top
styro.ru
su1ufa.ru
success-seo.com
suche.t-online.de
suckoutlet.xyz
sudachitravel.com
sugarkun.com
Expand Down
4 changes: 1 addition & 3 deletions web.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- https://github.com/Stevie-Ray/referrer-spam-blocker -->
<!-- Updated 2023-09-18 19:35:29 -->
<!-- Updated 2023-09-18 19:49:00 -->
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
Expand Down Expand Up @@ -128,7 +128,6 @@
<rule name="Referrer Spam addblueoff.com.ua" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_REFERER}" pattern="(addblueoff\.com\.ua)"/></conditions><action type="AbortRequest" /></rule>
<rule name="Referrer Spam adelachrist.top" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_REFERER}" pattern="(adelachrist\.top)"/></conditions><action type="AbortRequest" /></rule>
<rule name="Referrer Spam adelly.bg" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_REFERER}" pattern="(adelly\.bg)"/></conditions><action type="AbortRequest" /></rule>
<rule name="Referrer Spam adf.ly" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_REFERER}" pattern="(adf\.ly)"/></conditions><action type="AbortRequest" /></rule>
<rule name="Referrer Spam adpostmalta.com" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_REFERER}" pattern="(adpostmalta\.com)"/></conditions><action type="AbortRequest" /></rule>
<rule name="Referrer Spam adrenalinebot.net" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_REFERER}" pattern="(adrenalinebot\.net)"/></conditions><action type="AbortRequest" /></rule>
<rule name="Referrer Spam adrenalinebot.ru" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_REFERER}" pattern="(adrenalinebot\.ru)"/></conditions><action type="AbortRequest" /></rule>
Expand Down Expand Up @@ -3605,7 +3604,6 @@
<rule name="Referrer Spam styro.ru" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_REFERER}" pattern="(styro\.ru)"/></conditions><action type="AbortRequest" /></rule>
<rule name="Referrer Spam su1ufa.ru" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_REFERER}" pattern="(su1ufa\.ru)"/></conditions><action type="AbortRequest" /></rule>
<rule name="Referrer Spam success-seo.com" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_REFERER}" pattern="(success\-seo\.com)"/></conditions><action type="AbortRequest" /></rule>
<rule name="Referrer Spam suche.t-online.de" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_REFERER}" pattern="(suche\.t\-online\.de)"/></conditions><action type="AbortRequest" /></rule>
<rule name="Referrer Spam suckoutlet.xyz" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_REFERER}" pattern="(suckoutlet\.xyz)"/></conditions><action type="AbortRequest" /></rule>
<rule name="Referrer Spam sudachitravel.com" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_REFERER}" pattern="(sudachitravel\.com)"/></conditions><action type="AbortRequest" /></rule>
<rule name="Referrer Spam sugarkun.com" stopProcessing="true"><match url=".*" /><conditions><add input="{HTTP_REFERER}" pattern="(sugarkun\.com)"/></conditions><action type="AbortRequest" /></rule>
Expand Down

0 comments on commit 48b054b

Please sign in to comment.