Tutorial

Blocking ip's with .htaccess: The goal is to block as many unwanted ip's as possible with as little code as we can without catching some good ones in between. If we add too many our .htaccess file is going to get rather large and start to slow your site down.

The bigger the block range of ip's we add the more likely it is that we are going to block a few visitors that we actually want. We can allow them by using the allow from instead of deny from.

This list isn't for everyone, and it's use can very from one type of site to another. So again you may need to make some modifications to some of these ip addresses. This list can be added to any website .htaccess file to block unwanted traffic. It's not specifically for dolphin in particular, although it seems like dolphin sites do attract plenty of unwanted traffic.

In my case I would rather block 10 visitors up to no good, even if it meant deny 1 good visitor at the same time.

Examples of code added to main .htaccess
deny from 41.0.0.0/8

This would mean we are blocking ip address from:
41.0.0.0 thru 41.255.255.255

deny from 80.0.0.0/4

This would mean we are blocking ip address from:
80.0.0.0 thru 95.255.255.255
This is a very big block and it might not work for your needs. You may have to adjust this one or change it slightly. It does do away with tons of ip's with one line of code.

With this in mind instead of typing every single ip address per line such as:
deny from 41.0.0.0
deny from 41.0.0.1
deny from 41.0.0.2
deny from 41.0.0.3
etc...etc...etc...

We can do all or part with 1 line of code
deny from 41.0.0.0/8 (41.0.0.0-41.255.255.255)
deny from 41.0.0.0/16 (41.0.0.0-41.0.255.255)
deny from 41.0.0.0/12 (41.0.0.0-41.15.255.255)

If we want to allow certain ip's we can do this like:
allow from 41.0.0.0

or a range:
allow from 41.0.0.0/20 (41.0.0.0-41.0.15.255)
allow from 41.150.0.0/20 (41.150.0.0 - 41.150.15.255)

I have included a short and simple list that will block tons of ip's with a few simple lines of code. It can be insterted into your main public_html/.htaccess file. Not copied over, but added to your current .htaccess file.

Always back up your original first.

For example your .htaccess would look something like this after applying the modifications:

php_flag register_globals Off
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule .+ - [L]
RewriteRule ^([A-Za-z0-9_-]+)$ profile.php?ID=$1 [QSA,L]
</IfModule>
<Files *>
order deny,allow
deny from 41.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 62.0.0.0/8
deny from 77.0.0.0/8
deny from 78.0.0.0/8
deny from 79.0.0.0/8
deny from 80.0.0.0/4
deny from 194.0.0.0/8
deny from 195.0.0.0/8
deny from 196.0.0.0/8
deny from 213.0.0.0/8
deny from 217.0.0.0/8
deny from 38.100.41.64/26
</Files>
<Files .htaccess>
deny from all
</Files>


You should also make certain your server's ip address doesn't fall within one of the blocked ip ranges. If it does you will block your own site from the internet world. You can always add something like:
allow from 75.75.75.75 (myserverip)

Additionally it is a good idea to add your own home ip to the allow list:
allow from 192.192.192.192 (myhomeip)

And make sure the boonex rms media server is on the allowed list:
allow from 66.225.217.124

This may sound a little complicated to some, but it's relatively simple. Just copy and paste. And do a little research regarding ip addresses.

If you are experiencing suspecious activity or getting hits from odd ip address this can potentially illiminate it, or reduce it substantially.

For those of you with vps or dedicated you could add these to apf firewall deny or any other type of firewall you use instead for better performance.

Security Tips, Suggestions, and Thoughts:
Always keep site and database backups regularly.
-Database backups can usually be downloaded in a matter of seconds.
-Home directory site backups can get rather large depending on how many music, video, and photo's are uploaded.
*At the very least download a weekly backup.
Check your site stats with your hosting control panel.
Check your site logs with your hosting control panel to see where your traffic is comming from, and what visitors are viewing.
*Password protect your admin panel and moderator panel for an extra level of protection.

Some links worth looking at when you get a chance:
BoonexNerd

More Dolphin Help & Tutorials:
Good tutorials for beginners

 
Written By
Tutorial by: Jeremy LeSarge (AKA Ray)

I am the owner and administrator of DialMe.com. I write Tutorials for Boonex Dolphin as well as tips and resources surrounding website programming and development. I enjoy working with WordPress, SEO, and Web Hosting / Servers. I also maintain a WordPress Blog here on this site where you will find a variety of technology and webmaster resources.

Actions
Recommend
Sponsored Links