cPanel: How to block visitor by country through GeoIP

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.

To install GeoIP, refer to the following URL,
http://www.mickgenie.com/cpanel-how-to-install-mod_geoip

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

RewriteEngine on
RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^CN$
RewriteRule ^(.*)$ http://www.google.com [L]

The command use to redirect China IP to google.com***

***This is an example only and it is not to abuse any user/visitor reside in China.

SSL – Country Code not valid

When you submit your SSL enrollment process, you might get the error of ,

Country Code not valid

With the above error, you might not use the 2 digit country code with standard of ISO 3166.

The common mistake is using UK for England as known as United Kingdom, but you should use GB which Great Britain.

However, you may refer to the full 2 digit country code as URL below.
ISO 1366 Standard Country Code

http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htmIS

Install SSL through Shell

Today, I’m about to guide you how to install the SSL key and it will a bit tricky compare to generate the SSL CSR key.

To install the SSL key through Shell, refer to the step as below.
1. Go to path /usr/share/ssl/certs.
$ [email protected][/]# cd /usr/share/ssl/certs
2. Check if the domain.com.csr and domain.com.cabundle existed, else create them and enter the code.
3. Go to path /usr/share/ssl/private.
$ [email protected][/]# cd /usr/share/ssl/private Continue reading Install SSL through Shell

Create SSL certificate in Shell

SSL certificate is one of the digital encryption with full name of Secure Sockets Layer.

Many webmaster use SSL to encrypt their important information such as payment information, etc.

Before you proceed to create the CSR key for SSL, you need the information as below.

  • Domain name of Certificate
  • Country Code
  • State
  • City
  • Company Name
  • Company Division
  • Email Address of the Certificate
  • Password for the certificate

Run the following command from Shell. Continue reading Create SSL certificate in Shell