Forum Moderators: bakedjake
It was easy to setup this script, but I am wondering how it's possible to restrict access to my server from some countries. For example, I don't have any business with Korea or China and all what I get from these countries is a huge amount of spam, different scans etc. So, I would like to put these countries in my black list.
Kiss My Firewall allows to create block list in the following form:
################################################################################
# #
# CONFIG #4 (of 5): BLOCK_LIST #
# #
# This is where you can specify IP Addresses that you wish to block. If you #
# add a new one, simply restart this script for the changes to take effect. #
# #
# NOTE: More than one IP can be specified by separating with a space: #
# Ex. BLOCK_LIST="111.11.111.111 222.22.222.222 333.33.333.333" #
# #
################################################################################
What if I want to put a range of addresses in this list, for example: 61.4.64.0 - 61.4.79.255
What will be the right form? Like this:
61.4.64.*
or like this:
61.4.64.0/20
Lists of Chinese and Korean Ip addresses can be found here (if anyone interested):
[okean.com...]
[okean.com...]
There is a handy table here [ralphb.net] that may be useful to you or others. It shows for example, that if you wanted to block an entire class "c" (254 addresses) you would use "/24" as in xxx.xxx.xxx.xxx/24
Anyway hope this helps.