WHMCS integration of domain check for PKNIC domains

PKNICPakistan’s largest domains (cTLDs) provider PKNIC has no WHMCS modules or domain checking mechanism for 3rd party tools.

You can add these domains checker functionality to your WHMCS by doing below simple steps:

  • Login to your FTP and edit file “WHMCS installation folder/includes/whoisservers.php” in any text editor or Dreamweaver
  • Now paste following below code at the end of the file and save that file to your server.

Read More

Enable GeoIP on LiteSpeed web server

This tutorial explains how to install/configure/enable GeoIP location feature on litespeed web server.
Note: You can only use this feature with enterprise license of litespeed web server.

Follow these steps to get it enabled:

First of all download GeoIP location database from official web site (maxmind):

Login to your server via SSH with root access, and execute following commands:
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
cp GeoLiteCity.dat /usr/local/share/GeoIP/

Now you have downloaded GeoIP location database, next is to enable it from LiteSpeed control panel.

Follow these steps:

liteSpeed admin console->Server->General
->Enable IP GeoLocation: Yes

liteSpeed admin console->Server->General
->IP to GeoLocation DB: Add
DB File Path: /usr/local/share/GeoIP/GeoIPCity.dat
DB Cache Type: MemoryCache

Last step is to add a line in .htaccess file of your hosting account directory (public_html in cPanel)

GeoIPEnable On

Well you have configured/enabled GeoIP location system.

Now just make a test on it:
Create a php file on your hosting account, and paste below code in it:

<?
$countryName = $_SERVER["GEOIP_COUNTRY_NAME"];
$countryCode = $_SERVER["GEOIP_COUNTRY_CODE"];

echo $countryName.'<br/ >'.$countryCode;
?>

Now run this file from browser it should return your country name and country code.

The mod_security plugin could not connect to the database. Please verify that MySQL is running. Error: Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2) – Solution

If you’re getting following error while accessing mod_sec from WHM, here is the quick solution for this.

The Mod Security plugin could not connect to the database. Please verify that MySQL is running. Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Login to your WHM with root access.
Go to Service Manager from left menu.
See if MySQL Service is enabled and being monitored.
Check the boxes if unchecked.

Now access Mod Security from WHM. It should be working fine now.

Feedback are appreciated 🙂

Checking Bash Vulnerability and Fixing it

There has been a critical vulnerability found in Bash. The vulnerability affects Linux/Unix distributions that use or have Bash installed. For additional information on this vulnerability please visit the following link:

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-6271

We advise all our clients to keep their servers & software updated constantly to make sure their servers are at minimal risk of potential vulnerabilities. For this particular vulnerability we recommend reading the following links and taking action as soon as possible:

https://securityblog.redhat.com/2014/09/24/bash-specially-crafted-environment-variables-code-injection-attack/
https://access.redhat.com/articles/1200223

To test if your version of Bash is vulnerable, run the following command:

$ env x='() ; echo vulnerable' bash -c "echo this is a test"

If the output of the above command looks as follows:

vulnerable
this is a test

You are using a vulnerable version of Bash. The patch used to fix this issue ensures that no code is allowed after the end of a Bash function.

If you run the above example with the patched version of Bash, you should get an output verifying you are not vulnerable:

$ env x='() ; echo vulnerable' bash -c "echo this is a test"
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test

To fix this issue just update your bash by following command:

yum update bash -y

Now check bash again:

$ env x='() ; echo vulnerable' bash -c "echo this is a test"

It should return :

bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x'
this is a test

OR

this is a test

Copy and Paste is not working on my Remote Desktop Connection?

What do i do when clipboard stops working?

Luckily fixing the issue is pretty straightforward and involves a few simple steps.

Load up task manager (right click taskbar and select Task Manager)
Go to the Processes Tab
Select rdpclip.exe
Click End Process
Go to the Application Tab
Click New Process
Type rdpclip
Click Ok

Thats all, copy and paste should now work normally again.