Here I am specifying the steps which I used to configure remote backups through NFS.

Task - Configure backup for virtuzzo on backup server.

First, you have to make the appropriate directories available to nfs by "exporting" them. On the remote server, edit the /etc/exports file to expose the directories you need to the hosts that need to access them. See the man page for exports to find out all your options, but here's a simple example from my setup:

Code:

# /etc/exports

/backup 192.168.1.0(rw,no_root_squash,async)
/backup2 192.168.1.1(rw,no_root_squash,async)

The /etc/exports file must contain a directory, (in this example the directory being exported is /home), as well as the networks (or hosts) the file system is exported to.

In this case it's exported a range of hosts in the network 192.168.1.0. Alternately, it could be exported to a single host using the configuration:

Then go to virtozzo and mount the destination as given below:

[root@server1]# mount -t nfs 192.168.1.0:/backup2 /vz/backups

To check if it is mounted or not you can use showmount -e or mount command

Then write /etc/fstab as given below:

198.168.0.1:/backup2 /vz/backup nfs rsize=1024,wsize=1024,noauto 0 0

Then restart nfs and portmap on Virtuzzo server

[root@server1]# /etc/init.d/portmap restart
[root@server1]# /etc/init.d/nfs restart

Then go to backup server and check if its mounted on this server as well, you can use to check it showmount -e or mount command

If everything is ok, fire the command to effect the changes of /etc/exports:

[root@backup01 backup2]# exportfs -r

and restart both services on this server as well:

[root@server1]# /etc/init.d/portmap restart
[root@server1]# /etc/init.d/nfs restart


That's it, I got it worked. If you have any problem please email me at mayur.c24@gmail.com

EnjoyWink



How to set limit to remove the Frozen Maiils Automatically ?

vi /etc/exim.conf

timeout_frozen_after = 8d ( 8 Days )

/scripts/restartsrv_exim

Thats it EnjoyWink

How to remove the blocked ip using iptables

  1. First check that ip is blocked or not
  2. iptables –L –n | grep

DROP all -- 125.99.10.123 216.240.157.91

  1. to unblock the ip give the command

iptables -D INPUT -s 125.99.10.123 -d 216.240.157.91 -j DROP

Now the ip is unblocked.

Fantastico shows error 'You cannot install more than one script in the root directory of a domain'

In order to solve this issue you should follow these steps:

1. Log in cPanel and click on File Manager;

2. Navigate to .fantasticodata in your Home Directory;

3. Delete the file installed_in_root.php.

This will ensure there is no Fantastico information remaining from previous installations.

If you have problems with your Fantastico, ask your host for assistance.




- Mayur

Named rndc.key error when starting

When trying to restart named process after making modifications may end up in a corrupt rndc.key key and the error will show like this:

Sep 12 03:30:54 server named[23683]: /etc/rndc.key:1: configuring key ‘rndc-key’: bad base64 encoding
Sep 12 03:30:54 server named[23683]: loading configuration: bad base64 encoding
Sep 12 03:30:54 server named[23683]: exiting (due to fatal error)

A simple explanation to this is that the key got modified somehow might me some bug.
What to do about this? Well it is simple just check the /etc/rndc.conf file and copy the key from there(you will see the key in the first lines of the file) and replace the key that it is in /etc/rndc.key file and restart named process.


# service named restart
Stopping named: [ OK ]
Starting named: [ OK ]

Thats it EnjoyWink


WHM locked out – Brute Force Error

cPHulk Brute Force Protection prevents malicious forces from trying to access your server’s services by guessing the login password for that service. BUT sometimes it becomes troublesome when you are accessing the cPanel with incorrect password and cPanel assuming you as attacker blocks you with below message :

—————————————————————————————
This account is currently locked out because a brute force attempt was detected. Please wait 10 minutes and try again. Attempting to login again will only increase this delay. If you frequently experience this problem, we recommend having your username changed to something less generic.
—————————————————————————————

To get out of such situation you can disable cphulkd protection :

login via ssh and disable cphulkd using the command below.

root@HOST [~]# /usr/local/cpanel/etc/init/stopcphulkd

This should allow you to login to WHM and double check your cphulk settings.

You can view IP addresses that have been blocked via the WHM interface: WHM -> Security -> Security Center -> cPHulk Brute Force Protection in the Brutes table. On that screen, you can also customize brute force protection settings.

Then log into your WHM >> Security Center >> cPHulk Brute Force Protection >> Flush DB

Make Sure to restart cphulkd protection from SSH, simply fire the following command

root@HOST [~]# /usr/local/cpanel/etc/init/startcphulkd

Well the other way to this is to remove the IP’s blocked by cPHulk from its database .

ssh to the server login as root and type the following at the prompt

[root@server:] mysql

mysql> use cphulkd;

mysql>BACKUP TABLE brutes TO ‘/path/to/backup/directory’;

mysql> SELECT * FROM brutes WHERE `IP`=’xxx.xxx.xxx.xxx’;

mysql> DELETE FROM brutes WHERE `IP`=’xxx.xxx.xxx.xxx’;

mysql>quit

Thats it EnjoyWink


Installing PDFLib on PHP 5

PDFlib was removed awhile back for PHP5 because the newer versions have different licenses and we wanted to avoid any possible problems. The PHP4 version is still old so it's available in EasyApache, but of course I don't recommend PHP4 since it's not supported by the PHP developers anymore.

So if you want to install it, it will have to be outside of EasyApache. Here's how you could do it:

# wget http://www.pdflib.com/binaries/PDFlib/704/PDFlib-Lite-7.0.4p4.tar.gz
# tar -zxvf PDFlib-Lite-7.0.4p4.tar.gz
# cd PDFlib-Lite-7.0.4p4
# ./configure --without-java
# make && make install

Then build PHP with pdflib support.

# echo '--with-pdflib' >> '/var/cpanel/easy/apache/rawopts/all_php5'
# /scripts/easyapache --build

Finally, make sure pdflib is enabled as an extension in php.ini; add:

extension=pdf.so

to /usr/local/lib/php.ini and restart apache. Then it will show up. I have already done this for you as a courtesy

Thats it EnjoyWink