Near the bottom of this page you will find information regarding Dolphin 7's blocking ip addresses in the admin panel - IP blacklist system. The first part will be some general tips, suggestions, and information.
Spam is one of those never ending things that you will likely see more of in this digital age. You might have real person spam, or you could end up dealing with automated bot type of spam, or even both.
Some sites are just lucky and don't see too much of it. While other sites get hammered with it all the time. It might depend on what type of site you actually have, whether it has something that attracts more spam than others. The more popular and active your site becomes could attract more as well. It is difficult to know exactly why or what in particular attracts this kind of activity.
Depending on what site or company you ask, but at the time of this post these countries are among the top sources of spam:
You could block entire countries completely from your web site. You might block certain ranges of ip addresses that are causing problems at your site. Possibly use a current up to date blocklist of ip's that are associated with high spam rates. Maybe a combination.
I am generally not a fan of blocking an entire country unless there is very good reason. Not only is blocking certain countries a pain, the list can get rather big in a hurry.
If your host uses apache web server you can block ip's by means of .htaccess file. You can add a single ip address to block, or a range of ip addresses fairly fast and easy.
If you are using Dolphin 7 it comes with the ability to block ip addresses in the admin panel. I prefer to use .htaccess to make sure it is really working the way it should, but that is just my preference.
VPS and dedicated hosting users could block ip's with the servers firewall more efficiently than .htaccess blocking. With the more popular shared hosting you are pretty much stuck with .htaccess blocking or Dolphin 7's new ip blocking feature in the Admin Panel.
Currently Dolphin 7 logs ip addresses in the admin panel. However, it doesn't tell you the member of your site it is associated with. Which renders it almost useless. You can see ip addresses, but you have no idea who they belong to so you don't know which member you might want to ban, suspend, or even block. Kind of a dumb feature if you ask me. Hopefully Boonex will eventually come up with a better way of logging members ip address in the future.
For the time being for those of you comfortable enough modifying your Dolphin 7 site there is a FREE mod by DeeEmm at Boonex Unity that will allow you to log your members ip address along with their member ID number. Which will allow you to then ban, suspend, or block the member including their ip address if necessary. This usually does a good job, but there are always other sneaky tactics one could be using to hide or mask their ip address.
Another thing you can do is check your logs available in most hosting control panels. You might have a look at error logs and visitor logs. These can get rather large and difficult to go over, but they could provide some hints to where or what the problem member or visitor is up to or doing.
For lower traffic sites with minor spam simply adjusting your Dolphin Admin Panel membership permission levels might be enough. A little more moderation and/or approval settings might be all you need. Banning or suspending the member might be another option or solution.
If the problem persists, then you might think about blocking the ip completely and/or a range of ip address the member might be associated with. If you block too many or a large range there is always the possibility that you will block legitimate traffic.
For those of you that want to block an entire country you can try this site:
Select the country you wish to block. You can set the Prefix to "Deny" and Output to "CIDR"
Then click on the "Get IP ranges" button.
If it is a country that has a lot of ip addresses it will ask you to download the file. If there isn't too many associated with the particular country it will output them to your screen, and you can just copy and paste them to your .htaccess file.
For those of you interested in using a blocklist you can try this site:
Once there you can select your desired region of the world. Be advised these lists can get rather large though. They also have a section for firewall ip tables for those with VPS and/or Dedicated servers if interested.
The only thing I noticed about Wizcrafts list is they tell you to add it to your .htaccess like so:
# Philippines (PH)
deny from 18.104.22.168/21 22.214.171.124/18 126.96.36.199/17 188.8.131.52/24 184.108.40.206/19 220.127.116.11/19
But for most apache servers it should be 1 per line. So you may need to enter them like so instead:
# Philippines (PH)
deny from 18.104.22.168/21
deny from 22.214.171.124/18
deny from 126.96.36.199/17
deny from 188.8.131.52/24
deny from 184.108.40.206/19
deny from 220.127.116.11/19
Make sure you know what you are doing and download a backup of your .htaccess file before hand just in case you mess up. Htaccess file related code need to be entered exactly the right way. One little character out of whack and it will take down your whole site with a 500 internal server error.
Sample .htaccess code to block ip's:
deny from 18.104.22.168/13
deny from 22.214.171.124/13
deny from 126.96.36.199/13 will block all ip address from 188.8.131.52 to 184.108.40.206
So instead of adding all of them one by one you might elect to use the CDIR format to block many ip's with only one line of code in .htaccess.
If you go the banning or blocking ip route they should be added to your primary/main Dolphin .htaccess file. If you have Dolphin installed in your main root directory such as http://www.yoursite.com then you would add to http://www.yoursite.com/.htaccess file. If you have Dolphin installed in a subfolder such as http://www.yoursite.com/dolphin then you would add to http://www.yoursite.com/dolphin/.htaccess file.
For those of you that would like to use your Dolphin 7 Administration Panel to block ips you can login to your admin panel and navigate to:
Here you can enter ip addresses or ranges to deny.
In this example I will deny 220.127.116.11 to 18.104.22.168
I set the IP Role to deny
Click in the Expiration date, and the calendar opens to select a date when you want this rule to expire. I chose approximately 1 year.
You can enter a description to identify this deny rule so you can remember why you blocked it. Be as specific as you want.
Then click the "Apply" button.
Now you can see the rule I just created has been added.
Notice it says: "IP List Type is 0 : disabled"
So I want to enable this by going to:
Then find the Security menu/option.
Find "IP List Type (1 - all allowed except listed, 2 - all blocked except listed, 0 - disabled):
By default this is set to 0 - disabled.
Since I created a deny/blocked rule I want to set this to 1 - all allowed except listed and save the changes.
Now if I go back to:
You can see it now says: "IP List Type is 1 : All IPs allowed except listed"
Pretty simple. Add, remove, or edit them to you liking.
Like I said spam can be never ending. Hopefully you won't have to deal with too much, but undoubtedly at some point you will have some. The more popular and more traffic you get the more likely you will see it, or have to deal with it.