How to Upgrade IGB NIC Driver

Upgrade IGB Driver to Fix Packet Loss Problems

The early versions of igb NIC/LAN driver were buggy, if your version look like this:

# ethtool -i eth1
driver: igb
version: 5.0.5-k

Any version under v5.2.15 is buggy and a simple ping test to your server will show packet loss issues, usually around 20%.

To upgrade the driver, use the following steps.

1) cd /root
2) wget
3) tar -xvzf igb-5.2.17.tar.gz
4) cd igb-5.2.17/src/
5) make install
6) rmmod igb; modprobe igb
7) rmmod ixgbe; modprobe igb
8) vi /etc/sysconfig/modules/igb.modules

and set 

modprobe igb

9) Following is the output ::


root@server [~]# modinfo igb

filename: /lib/modules/2.6.32-504.12.2.el6.x86_64/kernel/drivers/net/igb/igb.ko
version: 5.2.17
license: GPL
description: Intel(R) Gigabit Ethernet Network Driver
author: Intel Corporation, 
srcversion: 420A0DE22C6377FB9C68995
alias: pci:v00008086d000010D6sv*sd*bc*sc*i*
root@server [~]# lsmod | grep dca
dca 7101 1 igb

Let’s see the active version after the upgrade:

# ethtool -i eth1
driver: igb
version: 5.2.17
firmware-version: 1.52, 0x800007ae
bus-info: 0000:01:00.1
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no

That resolves the issue. No reboot/restart is required.

How to: Connect to MySQL Remotely

mysqlEnabling Plesk 12 Remote MySQL Connections

1. Connect to your server via SSH.

2. Log into MySQL.

mysql -u admin -p`cat /etc/psa/.psa.shadow`

3. If you are attempting to grant non-localhost access to a user, you should use this line:

GRANT ALL PRIVILEGES ON dbname.* TO username@'IP' IDENTIFIED BY 'password';


  • dbname is replaced by the database you’d like to open up (a * here will open up all databases)
  • username is replaced by the user to be allowed access
  • IP is replaced by the actual IP to connect from (a % here will open up to all IPs — NOT RECOMMENDED).
  • password is replaced by the desired password. A blank field here will result in no password (NOT RECOMMENDED).¬†Changing the password for that user listed in Plesk will set it as well.

4. Apply these changes by using the MySQL command:


5. Next, quit MySQL by using this command:


6. You may need to allow the source IP from which you are connecting to connect to port 3306 after granting the privileges inside MySQL. Connect to your server as “root” and issue the following command:

iptables -I INPUT -s -p tcp --dport 3306 -j ACCEPT

Be sure to replace with your IP address.

Plesk 12 Stuck in Power User View

sshPlesk panel stuck in SMB / Power User Mode and Interface Management options are missing

Plesk admin login does not show full admin interface with service plans, subscriptions, domains etc.

If this happens, you need to resort to the command line to disable “Power User View”.

As root user execute the following command:

# /usr/local/psa/bin/poweruser --off

When you access the panel through your browser you will now see “Service Provider View”.

How to: Backup all MySQL Databases in Plesk

mysqlSometimes you need to make a dump of all MySQL databases, possibly prior to an upgrade or before you apply a required fix.

I prefer to dump all database as .SQL as an added safety measure, just in case a back out plan is required.

First we create a folder for our database dumps:

# mkdir /root/mysqlbackup

If you are running Plesk, let’s take a dump of the psa database:

# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow ` psa > /root/mysqlbackup/psa.`date +%F_%H.%M`.sql

We certainly want a dump of the mysql database itself:

# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow ` mysql > /root/mysqlbackup/mysql.`date +%F_%H.%M`.sql

Now we can perform a dump of all other databases:

# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow ` --all-databases > /root/mysqlbackup/all.`date +%F_%H.%M`.sql

If you now need to complete a MySQL upgrade (which may have failed prior) you can complete it as follows:

# mysql_upgrade -uadmin -p` cat /etc/psa/.psa.shadow ` --debug-check --debug-info --verbose

Find and Rename Files Containing Pattern

sshHow to search and rename files containing specific pattern

There are times when you need to search your server storage for files containing a specific pattern within them.

For instance, if a new vulnerability allows files to be injected to your server, you need to find these files and remove them – or at least rename them for further analysis later.

In this example, we want to find all files containing eval code x47LOB.

To find and list these files, without performing any other action:

# grep -lr --include=*.php '${"\\x47LOB' /path/to/web/root/

The following will find and rename them

# grep -lr --include=*.php '${"\\x47LOB' /path/to/web/root/ | xargs -n1 bash -c 'mv $0 $0.INFECTED'

You can change the xargs to remove them instead of moving them. This should get you started on finding and processing.