Skip to main content

Block Spam from Asia china .htaccess solution

After receiving tons of spam on the website I've decided to ban the whole apnic...
previously I've tried to ban only china and korea but without success.
Since I've not found anything to ban the whole APNIC I've searched for the assigned classes that they manage.

P.S. I've added a few LACNIC

just add this in a .htaccess file and the spam from the Asia should be gone

#list retrieved from
#http://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.txt

#Banning APNIC
deny from 1.0.0.0/8
deny from 27.0.0.0/8
deny from 36.0.0.0/8
deny from 39.0.0.0/8
deny from 42.0.0.0/8
deny from 43.0.0.0/8
deny from 49.0.0.0/8
deny from 58.0.0.0/8
deny from 59.0.0.0/8
deny from 60.0.0.0/8
deny from 61.0.0.0/8
deny from 101.0.0.0/8
deny from 103.0.0.0/8
deny from 106.0.0.0/8
deny from 110.0.0.0/8
deny from 111.0.0.0/8
deny from 112.0.0.0/8
deny from 113.0.0.0/8
deny from 114.0.0.0/8
deny from 115.0.0.0/8
deny from 116.0.0.0/8
deny from 117.0.0.0/8
deny from 118.0.0.0/8
deny from 119.0.0.0/8
deny from 120.0.0.0/8
deny from 121.0.0.0/8
deny from 122.0.0.0/8
deny from 123.0.0.0/8
deny from 124.0.0.0/8
deny from 125.0.0.0/8
deny from 126.0.0.0/8
deny from 133.0.0.0/8
deny from 150.0.0.0/8
deny from 153.0.0.0/8
deny from 163.0.0.0/8
deny from 171.0.0.0/8
deny from 175.0.0.0/8
deny from 180.0.0.0/8
deny from 182.0.0.0/8
deny from 183.0.0.0/8
deny from 202.0.0.0/8
deny from 203.0.0.0/8
deny from 210.0.0.0/8
deny from 211.0.0.0/8
deny from 218.0.0.0/8
deny from 219.0.0.0/8
deny from 220.0.0.0/8
deny from 221.0.0.0/8
deny from 222.0.0.0/8
deny from 223.0.0.0/8


Don't do it if you have contents that should be available to Asian people.
I'm not racists but the contents of my website is not intended for asian people and any asian person can understand that I'm just cutting down the spam.

Comments

Popular posts from this blog

Moodle 3.8.1+ - path leak via errors in several files

Moodle 3.8.1+ ----------------------------------------------- File: admin/mailout-debugger.php #!/usr/bin/php Notice : Disabled. in \admin\mailout-debugger.php on line 73 File: admin/settings/appearance.php Notice : Undefined variable: hassiteconfig in \admin\settings\appearance.php on line 10 Fatal error : Uncaught Error: Call to undefined function has_any_capability() in \admin\settings\appearance.php:10 Stack trace: #0 {main} thrown in \admin\settings\appearance.php on line 10 File: admin/settings/badges.php Notice : Undefined variable: hassiteconfig in \admin\settings\badges.php on line 30 Fatal error : Uncaught Error: Call to undefined function has_any_capability() in \admin\settings\badges.php:30 Stack trace: #0 {main} thrown in \admin\settings\badges.php on line 30 File: admin/settings/courses.php Notice : Undefined variable: hassiteconfig in \admin\settings\courses.php on line 32 Fatal error : Uncaught Error: Call to undefined function

2022 - Remove (the too many) Ads from Memu launcher

Simple method Download from pureapk "MEmu Launcher2" ex: MEmu Launcher2_v6.0.9_apkpure.com Install "System app remover" (root) remove from system apps the "memu launcher 2" import the "purified" MEmu Launcher2 apk with the Memu utility ("apk" on the right toolbar) Longer method Install "Export Apk" Export the memu launcher2  Install purify https://github.com/echo-devim/purify/raw/master/Purify.apk use purify with the exported memu launcher 2 Install "System app remover" (root) remove from system apps the "memu launcher 2" import the "purified" MEmu Launcher2 apk with the Memu utility ("apk" on the right toolbar)