Thursday, August 29, 2013

Install GeoIP in cPanel serve

To install GeoIP in cPanel server, run the following command as root,

root@server1 [~]# cd /var/cpanel/easy/apache/custom_opt_mods/

root@server1 [~]# wget

root@server1 [~]# tar -zxf custom_opt_mod-mod_geoip.tar.gz

root@server1 [~]# /scripts/easyapache

Next compile it with easyapache,

root@server1 [~]# /scripts/easyapache

Then select the Mod_GeoIP in the Short Options List.

To block a certain country IP range, you do not need to know which IP range it is and what you need is to use the GeoIP feature.

Next, you will need to insert the following command to the .htaccess file,



RewriteEngine on
RewriteRule ^(.*)$ [L]


The command use to redirect China IP to


No comments:

Post a Comment