Sunday, July 28, 2013

How to install Csf

Csf installation is very simple and quite straightforward. Login to the server as root, then navigate to the desired location where you wan't to download the installation file.
#cd /usr/local/src
Then download the installation package:
#wget http://www.configserver.com/free/csf.tgz
Now ontar the package using the blow command
#tar -xzf csf.tgz 
Now get into the directory csf
#cd csf 
Now run the below command to install
#sh install.sh
 Once the installation is done, you can do the configuration in
#/etc/csf/csf.conf
Once this is done  disable TESTING mode, lfd will not start while this is enabled. For this change the value to "0" from "1" in csf.conf file.
TESTING = "0"
Once this is done, restart the csf .
#csf -r 


DONE!!!! 

Friday, July 26, 2013

How to install SSL Certificate in a server running Lighttpd

For installing SSL Certificate for domain running in Lighttpd, follow the steps bellow. 

Login to the server and download / copy the certificate files.

Once this has been done, you need to concatenate the certificate and key file into a single pem file. For this follow the step below.
#cat yourdomain-name.key yourdomain-name.crt > yourdomain-name.pem
Now you need to edit lighttpd.conf file and add the following lines.
# vi /etc/lighttpd/lighttpd.conf
     var.confdir = "/etc/lighttpd"
     $SERVER["socket"] == "10.10.10.10:443" {
     ssl.engine = "enable"
     ssl.pemfile = var.confdir + "/yourdomain-name.pem"
     ssl.ca-file = var.confdir + "/your.crt"
     server.name = "your.domain.com"
     server.document-root = "/your/document/root/" }

Make sure that the var.confdir (/etc/lighttpd) is the location where you saved your certificate files. Also change the IP address (10.10.10.10) to your IP address.

Now restart Lighttpd.
#restart lighttpd
You are done. !!!!




Thursday, July 25, 2013

Assign dedicated ip to a domain in Cpanel

Assigning dedicated ip to an account is simple. You just need to follow the steps below.


Home » IP Functions







Home » IP Functions » Change a Site’s IP Address


From here select the account for which the ip has to be changed. Once selected click "Change" button at the bottom.



Now select the ip from the list that you click on the drop down button, and click " Change ".

This will change the ip of the account. 

Wednesday, July 24, 2013

Enable TUN/TAP in OpenVZ

For installing TUN/TAP for a OpenVZ vps, you should first make sure that the module is enabled in the node.

For this you need to run the command bellow.
# lsmod | grep tun
 If the module is not installed, just install it by running
# modprobe tun
Now to enable the module to the vps, run the following commands. Replace Veid with your vps id

# vzctl set Veid --devnodes net/tun:rw --save
# vzctl set Veid --devices c:10:200:rw --save
# vzctl stop Veid 
# vzctl set Veid --capability net_admin:on --save
# vzctl start Veid
# vzctl exec Veid mkdir -p /dev/net
# vzctl exec Veid chmod 600 /dev/net/tun
Now TUN/TAP is enabled for the vps. To check this get into the vps.
# vzctl enter Veid
Now run the following command in the vps.
# cat /dev/net/tun
 The result of the above command should be
cat: /dev/net/tun: File descriptor in bad state

Friday, July 5, 2013

Change timezone in Xen VPS


The file /etc/localtime is the one which holds information of server’s timezone.

For changing the timezone you should point it to the correct zone file by creating a soft link.

From following commands below we are changing the current timezone to IST:

Firstly move the current localtime file as backup.

#mv /etc/localtime /etc/localtime.bak
Now from /usr/share/zoneinfo/ you can find the preferred timezone. Once you found the timezone file, crate a soft link   to  /etc/localtime. Eg: For IST

#ln -sf /usr/share/zoneinfo/Asia/Calcutta /etc/localtime
You are done!! You can find the timezone changed. But if you reboot the vps the settings will get reverted back. So once finishing the steps above, do the following. 

 Run following command

echo 1 > /proc/sys/xen/independent_wallclock

Now installed ntp in the vps.

# yum install ntp 
# chkconfig ntpd on

 Synchronize the system clock with 0.pool.ntp.org server:

# ntpdate pool.ntp.org

Start NTP

# /etc/init.d/ntpd start


Now edit /etc/rc.local with your favorite editor and put the following lines there.

# vi  /etc/rc.local

service ntpd stop
echo 1 > /proc/sys/xen/independent_wallclock
ntpdate pool.ntp.org
service ntpd start


You would now get correct timezone and correct time every time you reboot your Xen VPS.



Change timezone in Openvz VPS



The file /etc/localtime is the one which holds information of server’s timezone.

For changing the timezone you should point it to the correct zone file by creating a soft link.

From following commands below we are changing the current timezone to IST:

Firstly move the current localtime file as backup.

#mv /etc/localtime /etc/localtime.bak
Now from /usr/share/zoneinfo/ you can find the preferred timezone. Once you found the timezone file, crate a soft link   to  /etc/localtime. Eg: For IST

#ln -sf /usr/share/zoneinfo/Asia/Calcutta /etc/localtime
Once the link is created, reboot the vps. 

#reboot

You are done!! Now you can find your timezone.



Thursday, July 4, 2013

How to setup custom nameservers in Kloxo


To setup custom nameservers in Kloxo, you have to register custom nameservers with your server IP address at your domain registrar.


After custom nameservers has been  registered in your domain registrar control panel, you can setup custom nameservers inside your Kloxo panel. For that you can follow the steps below. 


1. Login to Kloxo as " admin ".

2. From the home screen, click on the " DNS Templates " icon.

3. Now click the " Add DNS Template ".

4. Fill in the form.

5. In DNS Template Name field enter your prefered DNS template name (Any name).

6. From the dropdown lists choose your IP address for your Web and Mail services.

7. In "Primary DNS" and "Secondary DNS" enter your custom nameservers hostnames (The same you have registered in your domain registrar control panel).

8. Press " Add " button.

9. Then change DNS for your domain to you custom DNS servers at your domain registrar.

10. If all setup is done correctly, then it may take up to a 24-48 hours for DNS change to take effect.