<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Web Hosting Blog</title>
	<atom:link href="http://www.hostingbkk.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hostingbkk.com</link>
	<description>Web Hosting Articles By Linux Systems Administrator Shahram Azin</description>
	<pubDate>Mon, 14 Jun 2010 20:40:36 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>OpenVZ Installation on Centos</title>
		<link>http://www.hostingbkk.com/2010/06/14/openvz-installation-on-centos/</link>
		<comments>http://www.hostingbkk.com/2010/06/14/openvz-installation-on-centos/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 00:29:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[VPS]]></category>

		<category><![CDATA[Centos+openVZ]]></category>

		<category><![CDATA[openVZ+Installation]]></category>

		<guid isPermaLink="false">http://www.hostingbkk.com/?p=374</guid>
		<description><![CDATA[There are number of virtualization products exist for Linux. OpenVZ is one the most
popular among others which has been widely used by many Web Hosting Provider.
OpenVZ is a glorified Linux chroot or BSD jail system that allows you to completely isolate processes from each other, increase security by keeping bits separate, and tightly control resource [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "OpenVZ Installation on Centos", url: "http://www.hostingbkk.com/2010/06/14/openvz-installation-on-centos/" });</script>]]></description>
			<content:encoded><![CDATA[<p>There are number of virtualization products exist for Linux. OpenVZ is one the most<br />
popular among others which has been widely used by many Web Hosting Provider.</p>
<p>OpenVZ is a glorified Linux chroot or BSD jail system that allows you to completely isolate processes from each other, increase security by keeping bits separate, and tightly control resource utilization. OpenVZ refers to these &#8220;virtual machines&#8221; as containers, virtual private servers (VPS), or virtual environments (VE).</p>
<p><img src="http://hostingbkk.com/images/logo_openvz.jpg" alt="logo_openvz" /></p>
<p>The Installation of  OpenVZ is quite simple. It requires a special kernel to provide the virtualization support it needs, and this can be obtained easily via the OpenVZ project itself. The OpenVZ kernel patch is licensed under GPL license, and the user-level tools are under the QPL license.</p>
<p>The article below explain how to install OpenVZ container in CentOS 5.4. With OpenVZ you can create multiple Virtual Private Servers (VPS) on same hardware machine and running them simultaneously and efficiently.</p>
<p>1, Install OpenVZ</p>
<p>In order to install OpenVZ, we need to add the OpenVZ repository to yum, this would also help us keep the kernel up-to-date:</p>
<p>cd /etc/yum.repos.d<br />
wget http://download.openvz.org/openvz.repo<br />
rpm &#8211;import http://download.openvz.org/RPM-GPG-Key-OpenVZ</p>
<p>The repository contains a few different OpenVZ kernels (you can find more details here: http://wiki.openvz.org/Kernel_flavors), or with this command “yum search ovzkernel“.</p>
<p>Pick one of them and install it as follows:</p>
<p>yum install ovzkernel</p>
<p>This should automatically update the GRUB bootloader as well. An example is listed below”</p>
<p>cat /boot/grub/menu.lst<br />
# grub.conf generated by anaconda<br />
#<br />
# Note that you do not have to rerun grub after making changes to this file<br />
# NOTICE:  You have a /boot partition.  This means that<br />
#all kernel and initrd paths are relative to /boot/, eg.<br />
#root (hd0,0)<br />
#kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00<br />
#initrd /initrd-version.img<br />
#boot=/dev/sda<br />
default=0<br />
timeout=5<br />
splashimage=(hd0,0)/grub/splash.xpm.gz<br />
hiddenmenu<br />
title CentOS (2.6.18-128.2.1.el5.028stab064.7)<br />
root (hd0,0)<br />
kernel /vmlinuz-2.6.18-128.2.1.el5.028stab064.7 ro root=LABEL=/<br />
initrd /initrd-2.6.18-128.2.1.el5.028stab064.7.img</p>
<p>2, Pre-adjustings before the installation</p>
<p>Now we install some OpenVZ user tools:</p>
<p>yum install vzctl vzquota</p>
<p>Open /etc/sysctl.conf and make sure that you have the following settings in it:</p>
<p>cat /etc/sysctl.conf</p>
<p>net.ipv4.ip_forward = 1<br />
net.ipv4.conf.default.proxy_arp = 0<br />
net.ipv4.conf.all.rp_filter = 1<br />
kernel.sysrq = 1<br />
net.ipv4.conf.default.send_redirects = 1<br />
net.ipv4.conf.all.send_redirects = 0<br />
net.ipv4.icmp_echo_ignore_broadcasts=1<br />
net.ipv4.conf.default.forwarding=1</p>
<p>The following step is important if the IP addresses of your virtual machines are from a different subnet than the host system’s IP address. If you don’t do this, networking will not work in the virtual machines!</p>
<p>Open /etc/vz/vz.conf and set NEIGHBOUR_DEVS to all, the modified entry is like this “NEIGHBOUR_DEVS=all“. SELinux needs to be disabled, you can do it by making changes on its config file /etc/sysconfig/selinux. Finally, reboot the system, and then your new OpenVZ kernel should show up:</p>
<p>[root@server1 ~]# uname -r<br />
2.6.18-128.2.1.el5.028stab064.7</p>
<p>3, Create a Virutal Server</p>
<p>Before we can create virtual machines with OpenVZ, we need to have a template for the distribution that we want to use in the virtual machines in the /vz/template/cache by default. New virtual machines will be created from these templates. A list of precreated templates is available here.</p>
<p>I want to use CentOS 5 in my virtual machines, so I download a CentOS 5 template:</p>
<p>cd /vz/template/cache<br />
wget http://download.openvz.org/template/precreated/contrib/centos-5-i386-default.tar.gz</p>
<p>To set up a VPS from the default CentOS 5 template, run:</p>
<p>vzctl create 211 &#8211;ostemplate centos-5-i386-default &#8211;config vps.basic</p>
<p>The 211 must be uniqe and each virtual machine must have its own ID. You can use the last part of the VPS’s IP address for it. For example, if the virtual machine’s IP address is 192.168.0.211, you use 211 as the ID.</p>
<p>4, Common controls on OpenVZ</p>
<p>If you want to have the vm started at boot, run:</p>
<p>vzctl set 211 &#8211;onboot yes &#8211;save</p>
<p>To set a hostname and IP address for the vm, run:</p>
<p>vzctl set 211 &#8211;hostname test.example.com &#8211;save<br />
vzctl set 211 &#8211;ipadd 192.168.0.211 &#8211;save</p>
<p>Next we set the number of sockets to 120 and assign a few nameservers to the vm:</p>
<p>vzctl set 211 &#8211;numothersock 120 &#8211;save<br />
vzctl set 211 &#8211;nameserver 85.17.150.123 &#8211;nameserver 83.149.80.123 &#8211;nameserver 145.253.2.75 &#8211;save</p>
<p>Instead of using the vzctl set commands, you can directly edit vm’s configuration file which is stored in the directory /etc/vz/conf. If the ID of the vm is 211, then the configuration file is /etc/vz/conf/211.conf.</p>
<p>In order to start the vm, run “vzctl start 211″, to set a root password for the vm, run “vzctl exec 211 passwd”. Now You can either connect to the vm via SSH (e.g. with PuTTY), or login through console directly as follows:</p>
<p>vzctl enter 211</p>
<p>To leave the vm’s console, type “exit”, to stop a vm, run “vzctl stop 211“, to restart a vm, run “vzctl restart 211“.</p>
<p>To delete a vm from the hard drive (it must be stopped before you can do this), run “vzctl destroy 211“.</p>
<p>5, Check VM Status</p>
<p>To get a list of your vms and their statuses, run “vzlist -a” like this:</p>
<p>[root@server1 cache]# vzlist -a<br />
VEID      NPROC STATUS  IP_ADDR         HOSTNAME<br />
211         18 running 192.168.0.211   test.example.com</p>
<p>To find out about the resources allocated to a vm, run like follows:</p>
<p>[root@server1 cache]# vzctl exec 211 cat /proc/user_beancounters</p>
<p>The failcnt column is very important, it should be only zeros; if not, means that the vm needs more resources than currently allocated. Open the vm’s configuration file in /etc/vz/conf and raise the appropriate resource, then restart it.</p>
<p>To find out more about the vzctl command, run “man vzctl”.</p>
<p>Article Written By Shahram Azin   <a href="http://www.hostingbangkok.com">http://www.hostingbangkok.com/</a></p>
<div class="awmp_tags"><a href="http://www.hostingbkk.com/search/openVZ Installation/" rel="tag">openVZ Installation</a> <a href="http://www.hostingbkk.com/search/Centos openVZ/" rel="tag">Centos openVZ</a></div><p><a href="http://sharethis.com/item?&wp=2.6&amp;publisher=eaf0515d-6ba4-4ac9-9359-d170d1179dd2&amp;title=OpenVZ+Installation+on+Centos&amp;url=http%3A%2F%2Fwww.hostingbkk.com%2F2010%2F06%2F14%2Fopenvz-installation-on-centos%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hostingbkk.com/2010/06/14/openvz-installation-on-centos/feed/</wfw:commentRss>
		</item>
		<item>
		<title>VPS APF Firewall Installation</title>
		<link>http://www.hostingbkk.com/2010/01/12/vps-apf-firewall-installation/</link>
		<comments>http://www.hostingbkk.com/2010/01/12/vps-apf-firewall-installation/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 16:46:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[VPS Hosting]]></category>

		<category><![CDATA[VPS+APF+Firewall+Installation]]></category>

		<guid isPermaLink="false">http://www.hostingbkk.com/?p=371</guid>
		<description><![CDATA[The following article steps describe how to install APF in a OpenVZ or Virtuozzo VPS (VE)
In main server, 

1. First of all, you need to define which iptables modules should be available for VEs. 
Edit /etc/sysconfig/iptables-config: 
IPTABLES_MODULES=&#8221;ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp&#8221; 
Edit /etc/sysconfig/vz: 
IPTABLES=&#8221;ipt_REJECT [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "VPS APF Firewall Installation", url: "http://www.hostingbkk.com/2010/01/12/vps-apf-firewall-installation/" });</script>]]></description>
			<content:encoded><![CDATA[<p>The following article steps describe how to install APF in a OpenVZ or Virtuozzo VPS (VE)<br />
In main server, </p>
<p><img src="http://hostingbkk.com/images/apf_firewall.jpg" alt="apf_firewall_VPS" /></p>
<p>1. First of all, you need to define which iptables modules should be available for VEs. </p>
<p>Edit /etc/sysconfig/iptables-config: </p>
<p>IPTABLES_MODULES=&#8221;ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp&#8221; </p>
<p>Edit /etc/sysconfig/vz: </p>
<p>IPTABLES=&#8221;ipt_REJECT ipt_tos ipt_TOS ipt_LOG ip_conntrack ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length ipt_state iptable_nat ip_nat_ftp&#8221; </p>
<p>Please note - iptables modules in IPTABLES parameter in /etc/sysconfig/vz should be placed in one single line, no line breaks is allowed in this parameter. </p>
<p>Restart vz service. All VEs will be restarted. </p>
<p>service vz restart </p>
<p>2. Increase &#8216;numiptent&#8217; parameter for the VE you need to install APF into. This parameter limits the amount of iptables rules available for a VE. Default APF configuration requires ~200 rules. Let&#8217;s set it to 400: </p>
<p>vzctl set 101 &#8211;numiptent 400 &#8211;save </p>
<p>In VE (VPS), </p>
<p>1. Install APF inside the VE as usual. Edit /etc/apf/conf.apf, set the following parameters: </p>
<p>IFACE_IN=&#8221;venet0&#8243; IFACE_OUT=&#8221;venet0&#8243; SET_MONOKERN=&#8221;1&#8243; </p>
<p>2. Start APF inside the VE: </p>
<p>/etc/init.d/apf start </p>
<p>BTW the BFD installation procedure is same as we do in real servers.</p>
<p><a href="http://sharethis.com/item?&wp=2.6&amp;publisher=eaf0515d-6ba4-4ac9-9359-d170d1179dd2&amp;title=VPS+APF+Firewall+Installation&amp;url=http%3A%2F%2Fwww.hostingbkk.com%2F2010%2F01%2F12%2Fvps-apf-firewall-installation%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hostingbkk.com/2010/01/12/vps-apf-firewall-installation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>MySQL Optimization</title>
		<link>http://www.hostingbkk.com/2010/01/12/mysql-optimization/</link>
		<comments>http://www.hostingbkk.com/2010/01/12/mysql-optimization/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 16:18:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Load Balancing]]></category>

		<category><![CDATA[MySQL+Optimization]]></category>

		<guid isPermaLink="false">http://www.hostingbkk.com/?p=369</guid>
		<description><![CDATA[Here are my suggested settings for the my.cnf file. This should work well for a VPS with 256-512MB RAM.

Code:
[mysqld]
max_connections = 400
key_buffer = 16M
myisam_sort_buffer_size = 32M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 286
interactive_timeout = 25
wait_timeout = 1000
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 16M
query_cache_type = 1
tmp_table_size = 16M
skip-innodb
[mysqld_safe]
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "MySQL Optimization", url: "http://www.hostingbkk.com/2010/01/12/mysql-optimization/" });</script>]]></description>
			<content:encoded><![CDATA[<p>Here are my suggested settings for the my.cnf file. This should work well for a VPS with 256-512MB RAM.</p>
<p><img src="http://hostingbkk.com/images/high-performance-mysql-optimization.jpg" alt="Mysql-Optimization" /></p>
<p>Code:</p>
<p>[mysqld]<br />
max_connections = 400<br />
key_buffer = 16M<br />
myisam_sort_buffer_size = 32M<br />
join_buffer_size = 1M<br />
read_buffer_size = 1M<br />
sort_buffer_size = 2M<br />
table_cache = 1024<br />
thread_cache_size = 286<br />
interactive_timeout = 25<br />
wait_timeout = 1000<br />
connect_timeout = 10<br />
max_allowed_packet = 16M<br />
max_connect_errors = 10<br />
query_cache_limit = 1M<br />
query_cache_size = 16M<br />
query_cache_type = 1<br />
tmp_table_size = 16M<br />
skip-innodb</p>
<p>[mysqld_safe]<br />
open_files_limit = 8192</p>
<p>[mysqldump]<br />
quick<br />
max_allowed_packet = 16M</p>
<p>[myisamchk]<br />
key_buffer = 32M<br />
sort_buffer = 32M<br />
read_buffer = 16M<br />
write_buffer = 16M</p>
<p><a href="http://sharethis.com/item?&wp=2.6&amp;publisher=eaf0515d-6ba4-4ac9-9359-d170d1179dd2&amp;title=MySQL+Optimization&amp;url=http%3A%2F%2Fwww.hostingbkk.com%2F2010%2F01%2F12%2Fmysql-optimization%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hostingbkk.com/2010/01/12/mysql-optimization/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Securing VPS Tutorial</title>
		<link>http://www.hostingbkk.com/2010/01/12/securing-vps-tutorial/</link>
		<comments>http://www.hostingbkk.com/2010/01/12/securing-vps-tutorial/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 16:03:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Server Security]]></category>

		<category><![CDATA[Securing+VPS+Tutorial]]></category>

		<guid isPermaLink="false">http://www.hostingbkk.com/?p=365</guid>
		<description><![CDATA[This will help but as mentioned in previous posts, with a VPS you do not have access to your kernal. That is good in some ways, because if you don&#8217;t have access to it, neither to hackers or spammers (which limits what they can do). Its bad in ways, because you lose control and if [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Securing VPS Tutorial", url: "http://www.hostingbkk.com/2010/01/12/securing-vps-tutorial/" });</script>]]></description>
			<content:encoded><![CDATA[<p>This will help but as mentioned in previous posts, with a VPS you do not have access to your kernal. That is good in some ways, because if you don&#8217;t have access to it, neither to hackers or spammers (which limits what they can do). Its bad in ways, because you lose control and if you secure your box as much as possible, you are still at risk because you cannot control your kernal.<br />
At any rate, here are some helpful hints</p>
<p><img src="http://hostingbkk.com/images/VPS_SECURE.jpg" alt="VPS_SECURE_Tutorial" /></p>
<p>=========================================<br />
Checking for formmail<br />
=========================================</p>
<p>Form mail is used by hackers to send out spam email, by relay and injection methods. If you are using matts script or a version of it, you may be in jeopardy.<br />
Command to find pesky form mails:<br />
find / -name &#8220;[Ff]orm[mM]ai*&#8221;</p>
<p>CGIemail is also a security risk:<br />
find / -name &#8220;[Cc]giemai*&#8221;</p>
<p>Command to disable form mails:<br />
chmod a-rwx /path/to/filename<br />
(a-rwx translates to all types, no read, write or execute permissions).</p>
<p>(this disables all form mail)</p>
<p>If a client or someone on your vps installs form mail, you will have to let them know you are disabling their script and give them an alternative.<br />
=========================================<br />
Root kit checker - <a href="http://www.chkrootkit.org/">http://www.chkrootkit.org/</a><br />
=========================================</p>
<p>Check for root kits and even set a root kit on a cron job. This will show you if anyone has compromised your root. Always update chrootkit to get the latest root kit checker. Hackers and spammers will try to find insecure upload forms on your box and then with injection methods, try to upload the root kit on your server. If he can run it, it will modify *alot* of files, possibly causing you to have to reinstall.<br />
To install chrootkit, SSH into server and login as root.<br />
At command prompt type:</p>
<p>cd /root/<br />
wget <a href="ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz">ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz</a><br />
tar xvzf chkrootkit.tar.gz<br />
cd chkrootkit-0.44<br />
make sense<br />
To run chkrootkit</p>
<p>At command prompt type:<br />
/root/chkrootkit-0.44/chkrootkit</p>
<p>Make sure you run it on a regular basis, perhaps including it in a cron job.</p>
<p>Execution</p>
<p>I use these three commands the most.<br />
./chkrootkit<br />
./chkrootkit -q<br />
./chkrootkit -x | more<br />
=========================================<br />
Install a root breach DETECTOR and EMAIL WARNING<br />
=========================================</p>
<p>If someone does happen to get root, be warned quickly by installing a detector and warning at your box. You will at least get the hackers/spammers ip address and be warned someone is in there.<br />
Server e-mail everytime someone logs in as root</p>
<p>To have the server e-mail you everytime someone logs in as root, SSH into server and login as root.<br />
At command prompt type:<br />
pico .bash_profile</p>
<p>Scroll down to the end of the file and add the following line:</p>
<p>echo &#8216;ALERT - Root Shell Access on:&#8217; `date` `who` | mail -s &#8220;Alert: Root Access from `who | awk &#8216;{print $6}&#8217;`&#8221; <a href="mailto:your@email.com">your@email.com</a></p>
<p>Save and exit.<br />
Set an SSH Legal Message</p>
<p>To an SSH legal message, SSH into server and login as root.</p>
<p>At command prompt type:<br />
pico /etc/motd</p>
<p>Enter your message, save and exit.<br />
Note: I use the following message&#8230;</p>
<p>ALERT! You are entering a secured area! Your IP and login information<br />
have been recorded. System administration has been notified.<br />
This system is restricted to authorized access only. All activities on<br />
this system are recorded and logged. Unauthorized access will be fully<br />
investigated and reported to the appropriate law enforcement agencies.</p>
<p> </p>
<p>=========================================<br />
Web Host manager and CPANEL mods.<br />
=========================================</p>
<p>These are items inside of WHM/Cpanel that should be changed to secure your server.</p>
<p>Goto Server Setup =&gt;&gt; Tweak Settings<br />
Check the following items&#8230;</p>
<p>Under Domains<br />
Prevent users from parking/adding on common internet domains. (ie hotmail.com, aol.com)</p>
<p>Under Mail<br />
Attempt to prevent pop3 connection floods<br />
Default catch-all/default address behavior for new accounts - blackhole<br />
(according to ELIX - set this to FAIL, which is what I am going to do to reduce server load)</p>
<p>Under System<br />
Use jailshell as the default shell for all new accounts and modified accounts</p>
<p>Goto Server Setup =&gt;&gt; Tweak Security<br />
Enable php open_basedir Protection<br />
Enable mod_userdir Protection<br />
Disabled Compilers for unprivileged users.</p>
<p>Goto Server Setup =&gt;&gt; Manage Wheel Group Users<br />
Remove all users except for root and your main account from the wheel group.</p>
<p>Goto Server Setup =&gt;&gt; Shell Fork Bomb Protection<br />
Enable Shell Fork Bomb/Memory Protection</p>
<p>When setting up Feature Limits for resellers in Resellers =&gt;&gt; Reseller Center, under Privileges always disable Allow Creation of Packages with Shell Access and enable Never allow creation of accounts with shell access; under Root Access disable All Features.</p>
<p>Goto Service Configuration =&gt;&gt; FTP Configuration<br />
Disable Anonymous FTP</p>
<p>Goto Account Functions =&gt;&gt; Manage Shell Access<br />
Disable Shell Access for all users (except yourself)</p>
<p>Goto Mysql =&gt;&gt; MySQL Root Password<br />
Change root password for MySQL</p>
<p>Goto Security and run Quick Security Scan and Scan for Trojan Horses often. The following and similar items are not Trojans:<br />
/sbin/depmod<br />
/sbin/insmod<br />
/sbin/insmod.static<br />
/sbin/modinfo<br />
/sbin/modprobe<br />
/sbin/rmmod</p>
<p>=========================================<br />
More Security Measures<br />
=========================================</p>
<p>These are measures that can be taken to secure your server, with SSH access.</p>
<p>Update OS, Apache and CPanel to the latest stable versions.<br />
This can be done from WHM/CPanel.<br />
Restrict SSH Access<br />
To restrict and secure SSH access, bind sshd to a single IP that is different than the main IP to the server, and on a different port than port 22.</p>
<p>SSH into server and login as root.<br />
Note: You can download Putty by Clicking Here (<a href="http://www.chiark.greenend.org.uk/~s.../download.html">http://www.chiark.greenend.org.uk/~s&#8230;/download.html</a>). It&#8217;s a clean running application that will not require installation on Windows-boxes.</p>
<p>At command prompt type:<br />
pico /etc/ssh/sshd_config</p>
<p>Scroll down to the section of the file that looks like this:<br />
#Port 22<br />
#Protocol 2, 1<br />
#ListenAddress 0.0.0.0<br />
#ListenAddress ::</p>
<p>Uncomment and change<br />
#Port 22<br />
to look like<br />
Port 5678 (choose your own 4 to 5 digit port number (49151 is the highest port number AND do not use 5678  lol )</p>
<p>Uncomment and change<br />
#Protocol 2, 1<br />
to look like<br />
Protocol 2</p>
<p>Uncomment and change<br />
#ListenAddress 0.0.0.0<br />
to look like<br />
ListenAddress 123.123.123.15 (use one of your own IP Addresses that has been assigned to your server)</p>
<p>Note 1: If you would like to disable direct Root Login, scroll down until you find<br />
#PermitRootLogin yes<br />
and uncomment it and make it look like<br />
PermitRootLogin no</p>
<p>Save by pressing Ctrl o on your keyboard, and then exit by pressing Ctrl x on your keyboard.<br />
Note 2: You can also create a custome nameserver specifically for your new SSH IP address. Just create one called something like ssh.xyz.com or whatever. Be sure to add an A address to your zone file for the new nameserver.</p>
<p>Now restart SSH<br />
At command prompt type:<br />
/etc/rc.d/init.d/sshd restart</p>
<p>Exit out of SSH, and then re-login to SSH using the new IP or nameserver, and the new port.</p>
<p>Note: If you should have any problems, just Telnet into your server, fix the problem, then SSH in again. Telnet is a very unsecure protocol, so change your root password after you use it.</p>
<p>After SSH has been redirected, disable telnet.</p>
<p>Disable Telnet<br />
To disable telnet, SSH into server and login as root.<br />
At command prompt type: pico -w /etc/xinetd.d/telnet<br />
change disable = no to disable = yes<br />
Save and Exit<br />
At command prompt type: /etc/init.d/xinetd restart<br />
Disable Shell Accounts<br />
To disable any shell accounts hosted on your server SSH into server and login as root.<br />
At command prompt type: locate shell.php<br />
Also check for:<br />
locate irc<br />
locate eggdrop<br />
locate bnc<br />
locate BNC<br />
locate ptlink<br />
locate BitchX<br />
locate guardservices<br />
locate psyBNC<br />
locate .rhosts</p>
<p>Note: There will be several listings that will be OS/CPanel related. Examples are<br />
/home/cpapachebuild/buildapache/php-4.3.1/ext/ircg<br />
/usr/local/cpanel/etc/sym/eggdrop.sym<br />
/usr/local/cpanel/etc/sym/bnc.sym<br />
/usr/local/cpanel/etc/sym/psyBNC.sym<br />
/usr/local/cpanel/etc/sym/ptlink.sym<br />
/usr/lib/libncurses.so<br />
/usr/lib/libncurses.a<br />
etc.<br />
Disable identification output for Apache</p>
<p>(do this to hide version numbers from potentional hackers)</p>
<p>To disable the version output for proftp, SSH into server and login as root.<br />
At command prompt type: pico /etc/httpd/conf/httpd.conf</p>
<p>Scroll (way) down and change the following line to<br />
ServerSignature Off</p>
<p>Restart Apache<br />
At command prompt type: /etc/rc.d/init.d/httpd restart</p>
<p> </p>
<p>=========================================<br />
Install BFD (Brute Force Detection - optional)<br />
=========================================</p>
<p>To install BFD, SSH into server and login as root.</p>
<p>At command prompt type:<br />
cd /root/<br />
wget <a href="http://www.rfxnetworks.com/downloads/bfd-current.tar.gz">http://www.rfxnetworks.com/downloads/bfd-current.tar.gz</a><br />
tar -xvzf bfd-current.tar.gz<br />
cd bfd-0.4<br />
./install.sh</p>
<p>After BFD has been installed, you need to edit the configuration file.</p>
<p>At command prompt type:<br />
pico /usr/local/bfd/conf.bfd</p>
<p>Under Enable brute force hack attempt alerts:<br />
Find<br />
ALERT_USR=&#8221;0&#8243;<br />
and change it to<br />
ALERT_USR=&#8221;1&#8243;</p>
<p>Find<br />
EMAIL_USR=&#8221;root&#8221;<br />
and change it to<br />
EMAIL_USR=&#8221;<a href="mailto:your@email.com">your@email.com</a>&#8221;</p>
<p>Save the changes then exit.</p>
<p>To start BFD</p>
<p>At command prompt type:<br />
/usr/local/sbin/bfd -s<br />
Modify LogWatch<br />
Logwatch is a customizable log analysis system. It parses through your system&#8217;s logs for a given period of time and creates a report analyzing areas that you specify, in as much detail as you require. Logwatch is already installed on most CPanel servers.</p>
<p>To modify LogWatch, SSH into server and login as root.</p>
<p>At command prompt type:<br />
pico -w /etc/log.d/conf/logwatch.conf</p>
<p>Scroll down to<br />
MailTo = root<br />
and change to<br />
Mailto = <a href="mailto:your@email.com">your@email.com</a><br />
Note: Set the e-mail address to an offsite account incase you get hacked.</p>
<p>Now scroll down to<br />
Detail = Low<br />
Change that to Medium, or High&#8230;<br />
Detail = 5 or Detail = 10<br />
Note: High will give you more detailed logs with all actions.</p>
<p>Save and exit.</p>
<p>A number of suggestions to improve system security. Some of this is specific to CPanel, but much can be applied to most Linux systems.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Use The Latest Software<br />
Keep the OS and 3rd party software up to date. Always!<br />
CPanel itself can be updated from the root WHM.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Change Passwords<br />
Change the root passwords at least once a month and try to make them hard to guess. Yes it&#8217;s a pain to have to keep remembering them, but it&#8217;s better than being hacked.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Set Up A More Secure SSH Environment As described here.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Disable Telnet<br />
1. Type: pico -w /etc/xinetd.d/telnet<br />
2. Change the disable = no line to disable = yes.<br />
3. Hit CTRL+X press y and then enter to save the file.<br />
4. Restart xinted with: /etc/rc.d/init.d/xinetd restart<br />
Also, add the following line to /etc/deny.hosts to flag Telnet access attempts as &#8216;emergency&#8217; messages.</p>
<p>in.telnetd : ALL : severity emerg</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Disable Unnecessary Ports (optional)<br />
First backup the file that contains your list of ports with:<br />
cp /etc/services /etc/services.original<br />
Now configure /etc/services so that it only has the ports you need in it. This will match the ports enabled in your firewall.<br />
On a typical CPanel system it would look something like this:<br />
&lt;?php<br />
tcpmux 1/tcp # TCP port service multiplexer<br />
echo 7/tcp<br />
echo 7/udp<br />
ftp-data 20/tcp<br />
ftp 21/tcp<br />
ssh 22/tcp # SSH Remote Login Protocol<br />
smtp 25/tcp mail<br />
domain 53/tcp # name-domain server<br />
domain 53/udp<br />
http 80/tcp www www-http # WorldWideWeb HTTP<br />
pop3 110/tcp pop-3 # POP version 3<br />
imap 143/tcp imap2 # Interim Mail Access Proto v2<br />
https 443/tcp # MCom<br />
smtps 465/tcp # SMTP over SSL (TLS)<br />
syslog 514/udp<br />
rndc 953/tcp # rndc control sockets (BIND 9)<br />
rndc 953/udp # rndc control sockets (BIND 9)<br />
imaps 993/tcp # IMAP over SSL<br />
pop3s 995/tcp # POP-3 over SSL<br />
cpanel 2082/tcp<br />
cpanels 2083/tcp<br />
whm 2086/tcp<br />
whms 2087/tcp<br />
webmail 2095/tcp<br />
webmails 2096/tcp<br />
mysql 3306/tcp # MySQL<br />
?&gt;<br />
Additional ports are controlled by /etc/rpc. These aren&#8217;t generally needed, so get shot of that file with: mv /etc/rpc /etc/rpc-moved<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Watch The Logs<br />
Install something like logwatch to keep an eye on your system logs. This will extract anything &#8216;interesting&#8217; from the logs and e-mail to you on a daily basis.<br />
Logwatch can be found at: <a href="http://www.logwatch.org">http://www.logwatch.org</a><br />
Install instructions here.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Avoid CPanel Demo Mode<br />
Switch it off via WHM Account Functions =&gt; Disable or Enable Demo Mode.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Jail All Users<br />
Via WHM Account Functions =&gt; Manage Shell Access =&gt; Jail All Users.<br />
Better still never allow shell access to anyone - no exceptions.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Immediate Notification Of Specific Attackers<br />
If you need immediate notification of a specific attacker (TCPWrapped services only), add the following to /etc/hosts.deny</p>
<p>ALL : nnn.nnn.nnn.nnn : spawn /bin/ &#8216;date&#8217; %c %d | mail -s&#8221;Access attempt by nnn.nnn.nnn.nnn on for hostname&#8221; <a href="mailto:notify@mydomain.com">notify@mydomain.com</a><br />
Replacing nnn.nnn.nnn.nnn with the attacker&#8217;s IP address.<br />
Replacing hostname with your hostname.<br />
Replacing <a href="mailto:notify@mydomain.com">notify@mydomain.com</a> with your e-mail address.<br />
This will deny access to the attacker and e-mail the sysadmin about the access attempt.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Check Open Ports<br />
From time to time it&#8217;s worth checking which ports are open to the outside world. This can be done with:<br />
nmap -sT -O localhost<br />
If nmap isn&#8217;t installed, it can be selected from root WHM&#8217;s Install an RPM option.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Set The MySQL Root Password<br />
This can be done in CPanel from the root WHM Server Setup -&gt; Set MySQL Root Password.<br />
Make it different to your root password!<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Tweak Security (CPanel)<br />
From the root WHM, Server Setup -&gt; Tweak Security, you will most likely want to enable:<br />
- php open_basedir Tweak.<br />
- SMTP tweak.<br />
You may want to enable:<br />
- mod_userdir Tweak. But that will disable domain preview.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Use SuExec (CPanel)<br />
From root WHM, Server Setup -&gt; Enable/Disable SuExec. This is CPanel&#8217;s decription of what it does:<br />
&#8220;suexec allows cgi scripts to run with the user&#8217;s id. It will also make it easier to track which user has sent out an email. If suexec is not enabled, all cgi scripts will run as nobody. &#8221;<br />
Even if you don&#8217;t use phpsuexec (which often causes more problems), SuExec should be considered.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Use PHPSuExec (CPanel)<br />
This needs to built into Apache (Software -&gt; Update Apache from the root WHM) and does the same as SuExec but for PHP scripts.<br />
Wisth PHPSuExec enabled, you users will have to make sure that all their PHP files have permissions no greater than 0755 and that their htaccess files contain no PHP directives.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Disable Compilers<br />
This will prevent hackers from compiling worms, root kits and the like on your machine.<br />
To disable them, do the following:</p>
<p>chmod 000 /usr/bin/perlcc<br />
chmod 000 /usr/bin/byacc<br />
chmod 000 /usr/bin/yacc<br />
chmod 000 /usr/bin/bcc<br />
chmod 000 /usr/bin/kgcc<br />
chmod 000 /usr/bin/cc<br />
chmod 000 /usr/bin/gcc<br />
chmod 000 /usr/bin/i386*cc<br />
chmod 000 /usr/bin/*c++<br />
chmod 000 /usr/bin/*g++<br />
chmod 000 /usr/lib/bcc /usr/lib/bcc/bcc-cc1<br />
chmod 000 /usr/i386-glibc21-linux/lib/gcc-lib/i386-redhat-linux/2.96/cc1</p>
<p>You will need to enable them again when you need to perform system updates. To do this, run:</p>
<p>chmod 755 /usr/bin/perlcc<br />
chmod 755 /usr/bin/byacc<br />
chmod 755 /usr/bin/yacc<br />
chmod 755 /usr/bin/bcc<br />
chmod 755 /usr/bin/kgcc<br />
chmod 755 /usr/bin/cc<br />
chmod 755 /usr/bin/gcc<br />
chmod 755 /usr/bin/i386*cc<br />
chmod 755 /usr/bin/*c++<br />
chmod 755 /usr/bin/*g++<br />
chmod 755 /usr/lib/bcc /usr/lib/bcc/bcc-cc1<br />
chmod 755 /usr/i386-glibc21-linux/lib/gcc-lib/i386-redhat-linux/2.96/cc1</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Obfuscate The Apache Version Number<br />
1. Type: pico /etc/httpd/conf/httpd.conf<br />
2. Change the line that begins ServerSignature to:</p>
<p>ServerSignature Off</p>
<p>3. Add a line underneath that which reads:</p>
<p>ServerTokens ProductOnly</p>
<p>4. Hit CTRL+X, they y, the enter to save the file.<br />
5. Restart Apache with: /etc/rc.d/init.d/httpd restart<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>COMMON COMMANDS I USE<br />
System Information<br />
who<br />
List the users logged in on the machine. &#8211;</p>
<p>rwho -a<br />
List all users logged in on your network. The rwho service must be enabled for this command to work.</p>
<p>finger user_name<br />
System info about a user. Try: finger root last. This lists the users last logged-in on your system.</p>
<p>history | more<br />
Show the last (1000 or so) commands executed from the command line on the current account. The | more causes the display to stop after each screen fill.</p>
<p>pwd<br />
Print working directory, i.e. display the name of your current directory on the screen.</p>
<p>hostname<br />
Print the name of the local host (the machine on which you are working).</p>
<p>whoami<br />
Print your login name.</p>
<p>id username<br />
Print user id (uid) and his/her group id (gid), effective id (if different than the real id) and the supplementary groups.</p>
<p>date<br />
Print or change the operating system date and time. E.g., change the date and time to 2000-12-31 23:57 using this command</p>
<p>date 123123572000<br />
To set the hardware clock from the system clock, use the command (as root)<br />
setclock</p>
<p>time<br />
Determine the amount of time that it takes for a process to complete+ other info. Don’t confuse it with date command. For e.g. we can find out how long it takes to display a directory content using time ls</p>
<p>uptime<br />
Amount of time since the last reboot</p>
<p>ps<br />
List the processes that are have been run by the current user.</p>
<p>ps aux | more<br />
List all the processes currently running, even those without the controlling terminal, together with the name of the user that owns each process.</p>
<p>top<br />
Keep listing the currently running processes, sorted by cpu usage (top users first).</p>
<p>uname -a<br />
Info on your server.</p>
<p>free<br />
Memory info (in kilobytes).</p>
<p>df -h<br />
Print disk info about all the file systems in a human-readable form.</p>
<p>du / -bh | more<br />
Print detailed disk usage for each subdirectory starting at root (in a human readable form).</p>
<p>lsmod<br />
(as root. Use /sbin/lsmod to execute this command when you are a non-root user.) Show the kernel modules currently loaded.</p>
<p>set|more<br />
Show the current user environment.</p>
<p>echo $PATH<br />
Show the content of the environment variable PATH. This command can be used to show other environment variables as well. Use set to see the full environment.</p>
<p>dmesg | less<br />
Print kernel messages (the current content of the so-called kernel ring buffer). Press q to quit less. Use less /var/log/dmesg to see what dmesg dumped into the file right after bootup. - only works on dedciated systems</p>
<p>Commands for Process control<br />
ps<br />
Display the list of currently running processes with their process IDs (PID) numbers. Use ps aux to see all processes currently running on your system (also those of other users or without a controlling terminal),<br />
each with the name of the owner. Use top to keep listing the processes currently running.</p>
<p>fg<br />
PID Bring a background or stopped process to the foreground.</p>
<p>bg<br />
PID Send the process to the background. This is the opposite of fg. The same can be accomplished with Ctrl z</p>
<p>any_command &amp;<br />
Run any command in the background (the symbol ‘&amp;’ means run the command in the background?).</p>
<p>kill PID<br />
Force a process shutdown. First determine the PID of the process to kill using ps.</p>
<p>killall -9 program_name<br />
Kill program(s) by name.</p>
<p>xkill<br />
(in an xwindow terminal) Kill a GUI-based program with mouse. (Point with your mouse cursor at the window of the process you want to kill and click.)</p>
<p>lpc<br />
(as root) Check and control the printer(s). Type ??? to see the list of available commands.</p>
<p>lpq<br />
Show the content of the printer queue.</p>
<p>lprm job_number<br />
Remove a printing job job_number from the queue.</p>
<p>nice program_name<br />
Run program_name adjusting its priority. Since the priority is not specified in this example, it will be adjusted by 10 (the process will run slower), from the default value (usually 0). The lower the number (of niceness to other users on the system), the higher the priority. The priority value may be in the range -20 to 19. Only root may specify negative values. Use top to display the priorities of the running processes.</p>
<p>renice -1 PID<br />
(as root) Change the priority of a running process to -1. Normal users can only adjust processes they own, and only up from the current value (make them run slower).<br />
Optimizing your VPS server (help it run more efficiently)</p>
<p><a href="http://sharethis.com/item?&wp=2.6&amp;publisher=eaf0515d-6ba4-4ac9-9359-d170d1179dd2&amp;title=Securing+VPS+Tutorial&amp;url=http%3A%2F%2Fwww.hostingbkk.com%2F2010%2F01%2F12%2Fsecuring-vps-tutorial%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hostingbkk.com/2010/01/12/securing-vps-tutorial/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Easiest ways to make money online with web hosting</title>
		<link>http://www.hostingbkk.com/2009/11/07/the-easiest-ways-to-make-money-online-with-web-hosting/</link>
		<comments>http://www.hostingbkk.com/2009/11/07/the-easiest-ways-to-make-money-online-with-web-hosting/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 15:08:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Web Hosting]]></category>

		<category><![CDATA[Web+Hosting]]></category>

		<guid isPermaLink="false">http://www.hostingbkk.com/?p=360</guid>
		<description><![CDATA[Webhosting is the process of storing, serving and maintaining the files in a web server which can be accessed by others through the internet. It is the base for all websites. It is a very competitive marketplace.

Many webhosting companies create affiliate programs to get hold of more customers. Depends on this web hosting program, you [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "The Easiest ways to make money online with web hosting", url: "http://www.hostingbkk.com/2009/11/07/the-easiest-ways-to-make-money-online-with-web-hosting/" });</script>]]></description>
			<content:encoded><![CDATA[<p>Webhosting is the process of storing, serving and maintaining the files in a web server which can be accessed by others through the internet. It is the base for all websites. It is a very competitive marketplace.</p>
<p><img src="http://hostingbkk.com/images/server-monitoring.jpg" alt="server-monitoring" /></p>
<p>Many webhosting companies create affiliate programs to get hold of more customers. Depends on this web hosting program, you will make money online when you refer a customer who buys a hosting plan. These affiliate programs are the easiest way to <a href="http://moneymakerinfo.blogspot.com">make money</a> for webmasters, bloggers and internet marketers.</p>
<p>You may have seen many ads in many sites. These web hosting affiliate programs works good for all the websites particularly if you are offering a website consultation service for clients. It offers high commission, thus by Just referring a single customer, you can make more money.</p>
<p>There are numerous techniques of making money with web hosting affiliate programs. You can include the affiliate links on your websites or blogs. Blogs take up very little disk space and bandwidth allowance. You can host many blogs and you can charge a fine price for your services. It take slight technical assist on your part thus by you can develop your business faster. Posting in forums with answers will bring you a lot of qualified business.</p>
<p>You can also create a pre-sell page as an alternative of linking directly to the web host. You can pull traffic from your website to send targeted visitors to any specific webpage. The ultimate aim is to get as many individuals to click through on your affiliate links.</p>
<p>Reseller hosting is another way to make money online with web hosting. It allows you to sell the services of a web hosting company as your own. It consists of buying a web hosting package and reselling it for a larger price. To do this task, webmasters must need huge amount of space to divide it up among other people. Check out several resellers that offer varying amounts of space and storage when building an Internet host business.</p>
<p>Some companies offering reseller web hosting may do all the technical work for you, and also manage your servers, so all you have to do is to sell their products. You can buy a reseller hosting easily for just $30 per month. With this small investment, you will make your way to make money.</p>
<p><a href="http://sharethis.com/item?&wp=2.6&amp;publisher=eaf0515d-6ba4-4ac9-9359-d170d1179dd2&amp;title=The+Easiest+ways+to+make+money+online+with+web+hosting&amp;url=http%3A%2F%2Fwww.hostingbkk.com%2F2009%2F11%2F07%2Fthe-easiest-ways-to-make-money-online-with-web-hosting%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hostingbkk.com/2009/11/07/the-easiest-ways-to-make-money-online-with-web-hosting/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Benefits Of Using Microsoft Exchange Server</title>
		<link>http://www.hostingbkk.com/2009/04/01/the-benefits-of-using-microsoft-exchange-server/</link>
		<comments>http://www.hostingbkk.com/2009/04/01/the-benefits-of-using-microsoft-exchange-server/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 22:45:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Windows Web Hosting]]></category>

		<category><![CDATA[Microsoft+Exchange+Server]]></category>

		<guid isPermaLink="false">http://www.hostingbkk.com/?p=351</guid>
		<description><![CDATA[Microsoft Exchange Server is software product designed to make emailing faster and more efficient. As email is now a critical function in the business environment and a great deal of business is now conducted by email, many companies are finding that using Microsoft Exchange Server has increased the reliability of their email functions as well [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "The Benefits Of Using Microsoft Exchange Server", url: "http://www.hostingbkk.com/2009/04/01/the-benefits-of-using-microsoft-exchange-server/" });</script>]]></description>
			<content:encoded><![CDATA[<p>Microsoft Exchange Server is software product designed to make emailing faster and more efficient. As email is now a critical function in the business environment and a great deal of business is now conducted by email, many companies are finding that using Microsoft Exchange Server has increased the reliability of their email functions as well as adding a host of other applications that can be utilized to make conducting regular business even easier. So what exactly are the benefits of using Microsoft Exchange Server?</p>
<p><img src="http://hostingbkk.com/images/Microsoft-_Server.jpg" alt="Microsoft-_Server" /></p>
<p>One of the biggest benefits that Microsoft Exchange Server provides to its users in the enhance security features included in the software package. There are many different threats that can compromise the security of a software package today and Microsoft Exchange Server works to neutralize those threats, leaving the users less vulnerable to hackers, viruses, and spam. It also works to ensure that emails remain confidential and are not compromised by outside sources. This enhanced security allows companies to feel confident that their email system is protected at all times and allows employees and customers to utilize the email system to its full potential.</p>
<p>Companies that use Microsoft Exchange Server can allow their employees to access their email from anywhere in the world. Whether the employee is in the office or on the road, they will be able to access all of their important documents and can respond to any important inquiry at a moments notice. The email platform used by Microsoft Exchange Server is Microsoft Office Outlook which has many different features designed to make email and contact management simple and trouble-free. Some of the features that can be used with Microsoft Office Outlook and Microsoft Exchange Server include calendar features, scheduling features, voice mail storage, and contact management programs.<br />
Microsoft Exchange Server also allows businesses to be more efficient, by making it a great deal easier to find and fix any issues that may arise. It also has improved monitoring capabilities so that any issues that do occur can be detected quickly before it disrupts business by a great amount. Many tasks that are needed to keep Microsoft Exchange Server operating properly have been automated, allowing the administrators more time to deal with more pressing issues. There are many benefits to using Microsoft Exchange Server and many businesses are discovering that this is a program that they cannot do without.</p>
<p><a href="http://sharethis.com/item?&wp=2.6&amp;publisher=eaf0515d-6ba4-4ac9-9359-d170d1179dd2&amp;title=The+Benefits+Of+Using+Microsoft+Exchange+Server&amp;url=http%3A%2F%2Fwww.hostingbkk.com%2F2009%2F04%2F01%2Fthe-benefits-of-using-microsoft-exchange-server%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hostingbkk.com/2009/04/01/the-benefits-of-using-microsoft-exchange-server/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cpanel make full backups work with rsync</title>
		<link>http://www.hostingbkk.com/2009/04/01/cpanel-make-full-backups-work-with-rsync/</link>
		<comments>http://www.hostingbkk.com/2009/04/01/cpanel-make-full-backups-work-with-rsync/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 21:44:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[cPanel]]></category>

		<category><![CDATA[Cpanel+Backup+Rsync]]></category>

		<guid isPermaLink="false">http://www.hostingbkk.com/?p=344</guid>
		<description><![CDATA[This is the nice solution for those who use Cpanel server ( version 11 and above ) to setup rsync directly from whm .
Latest edit: rsyncable option is now included in cpbackup by cPanel, so all the instructions below are moot for version 11 and up.
Edits: The simplified version after much testing and trial is [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Cpanel make full backups work with rsync", url: "http://www.hostingbkk.com/2009/04/01/cpanel-make-full-backups-work-with-rsync/" });</script>]]></description>
			<content:encoded><![CDATA[<p>This is the nice solution for those who use Cpanel server ( version 11 and above ) to setup rsync directly from whm .</p>
<p>Latest edit: rsyncable option is now included in cpbackup by cPanel, so all the instructions below are moot for version 11 and up.</p>
<p>Edits: The simplified version after much testing and trial is provided below. Thanks to Chirpy for finding the exact method that works so simply! Also added a simple rotation script.</p>
<p><img src="http://hostingbkk.com/images/rsync.jpg" alt="rsync" /></p>
<p>Modify the root crontab changing the line shown as follows:</p>
<p>Quote:<br />
0 1 * * * /scripts/cpbackup</p>
<p>to:</p>
<p>0 1 * * * export GZIP=&#8221;&#8211;rsyncable&#8221; ; /scripts/cpbackup </p>
<p>That&#8217;s it!</p>
<p>Here&#8217;s a simple script to rotate the backups:<br />
Code:<br />
#!/bin/sh</p>
<p># This script rotates the backup files daily, keeping 7 days worth.</p>
<p>DATEFORMAT=$(date +%a)<br />
BACKUPSOURCE=/backup<br />
BACKUPDEST=/Data/backup/rotation/</p>
<p>rm -Rf $BACKUPDEST/$DATEFORMAT<br />
mkdir $BACKUPDEST/$DATEFORMAT<br />
cp -R $BACKUPSOURCE/* $BACKUPDEST/$DATEFORMAT<br />
The original post is below.</p>
<p>******** Original Post ************<br />
Note: This post may become obsolete if it turns out that setting a permanent environment variable fixes the issue. If so, this will get updated to reflect that.</p>
<p>Using the Full Backup feature built into WHM is nice, because it grabs pretty much everything and creates stand-alone backups. The problem with this backup, however, is that because it uses gzip compression, it isn&#8217;t rsync-friendly.</p>
<p>Rsync is a nifty file transfer tool that only transfers the changes in a file. So, once you have downloaded a backup once, rather than download the whole backup again to update it, it only sends the changes to the file and incorporates them into the existing file. In the case of files that have been compressed using the default gzip settings, almost the entire file is transferred again because of the adaptive compression algorithm.<br />
Ok, seriously, the good news is that later versions of gzip have the capability of playing nice with rysnc by way of the &#8216;&#8211;rsyncable&#8217; switch. With an rsyncable gzip file, rsync can process it much more efficiently. (You can check your version of gzip to see if it will handle rsync by looking at the help: &#8216;gzip &#8211;help&#8217;)</p>
<p>So how do we make that happen? The good news is it&#8217;s a simple, one-line modification to the &#8216;cpbackup&#8217; script located in the /scripts directory. The bad news is that cpanel will overwrite this file every time it runs the &#8216;upcp&#8217; script. This means we have to protect it somehow. Another nifty script will take care of that.</p>
<p>So, first, let&#8217;s modify the &#8216;cpbackup&#8217; script:</p>
<p>1) make a copy of the script and call it &#8216;cpbackupunedited&#8217;</p>
<p>Quote:<br />
cp /scripts/cpbackup /scripts/cpbackupunedited </p>
<p>2) Open the &#8216;cpbackup&#8217; script and add the following line just after the remarks at the top, but before the &#8216;BEGIN&#8217; statement<br />
Quote:<br />
$ENV{&#8217;GZIP&#8217;} .= &#8220;&#8211;rsyncable&#8221;; </p>
<p>3) Save the script. Now, make another copy of the file, this time calling it &#8216;cpbackupedited&#8217;<br />
Quote:<br />
cp /scripts/cpbackup /scripts/cpbackupedited </p>
<p>Your backups are now going to work with rsync rather nicely! For instance, on the first test I made using a 1.5gig set of gzip files, 35 megs were transferred, in contrast to the 1.2gigs transferred without the &#8211;rsyncable switch. That speeds up transfer times quite a bit!</p>
<p>Now, we need to protect our cpbackup file. While we could &#8216;chattr&#8217; so that it can&#8217;t be overwritten, there is another, more refined method that will let us know if there are changes in the script that need to be looked at. This is a modification of the &#8216;watchwwwacct&#8217; script you can read more about elsewhere on the forum. I&#8217;ll post just the modified script for sake of brevity:</p>
<p> </p>
<p>Quote:<br />
#!/usr/bin/perl<br />
# You may need to change this path to /usr/local/bin/perl</p>
<p>$mailprog = &#8220;/usr/sbin/sendmail&#8221;;</p>
<p>#************************************************* *************<br />
#<br />
# Script to monitor cpbackup script customizations: watchcpbackup V1.1<br />
#<br />
#<br />
# Set a few variables below and upload this script to anywhere on your server,<br />
# then set a cron job to run the script every hour. I put mine in a subfolder<br />
# of the servers scripts folder. (/scripts/custom)<br />
#<br />
# To set the cronjob, in shell, type crontab -e, then enter what&#8217;s between the quotes<br />
# on the following line as a new line in your cron listings:<br />
# &#8220;0 * * * * /scripts/custom/watchcpbackup.cgi&#8221;<br />
#<br />
# Ownership and permissions of the script should be root:root, and 0700.<br />
#<br />
# This script only needs to run after a cpanel upgrade, so you could set<br />
# the cron job to run it 1 hour after upcp runs, but then if you change<br />
# when upcp runs, you will need to change this also. This script is fast,<br />
# so it&#8217;s easier to just run it every hour.<br />
#<br />
# **** Using this script ****<br />
# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
# To use this script, you need to make a copy of the real cpbackup script and call it<br />
# cpbackupunedited, then after your customizations, make a copy of your custom one and<br />
# call it cpbackupedited. These copies need to be in the same directory as cpbackup.<br />
# What this script does is compare your custom cpbackup script to a copy of it.<br />
# If a cpanel update changes the cpbackup script, this script will notice the change.<br />
# Now the fun part. Many upgrades only change the cpbackup script back to what it was<br />
# originally. If it&#8217;s changed, this script compares the new cpbackup to a copy of the<br />
# original one. If the update merely wrote the original one back, it would match the<br />
copy. This script would then take the copy of your custom one and reuse it. Now, if<br />
# the update altered the script, you would be emailed and told that your customizations<br />
# are lost and that you will need to redo them. The script does tell you where changes<br />
# were made to help with reapplying your customizations.<br />
# customized my cpbackup script over a year ago and have only had to redo the changes<br />
# maybe half a dozen times.<br />
# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
#<br />
#<br />
# Registered users of this script will be notified of any future updates.<br />
# If you registered this copy with me, put your email here for future reference.<br />
# This copy is registered to:<br />
#<br />
#************************************************* *************<br />
# This is where the email will be sent when a change is detected.<br />
# If you use spamassassin, you should include a name, like this:<br />
# $sendto_email = &#8216;YourName &lt;<a href="mailto:you@youremail.com&gt;'">you@youremail.com&gt;&#8217;</a>;<br />
$sendto_email = &#8216;YourName &lt;<a href="mailto:you@youremail.com&gt;'">you@youremail.com&gt;&#8217;</a>;</p>
<p># This is the sender for the email message.<br />
# Change it if you wish.<br />
$sender_email = &#8216;YourName &lt;<a href="mailto:you@youremail.com&gt;'">you@youremail.com&gt;&#8217;</a>;</p>
<p># This is where your cpbackup file is located.<br />
# It shouldn&#8217;t need to be changed.<br />
$path = &#8220;/scripts&#8221;;</p>
<p> </p>
<p>$diff1 = system(&#8221;cmp $path/cpbackup $path/cpbackupedited&#8221;);</p>
<p>if ($diff1 eq &#8220;0&#8243;) {<br />
exit;<br />
}<br />
else {<br />
$diff2 = system(&#8221;cmp $path/cpbackup $path/cpbackupunedited&#8221;);<br />
}</p>
<p>if ($diff2 eq &#8220;0&#8243;) {<br />
system(&#8221;cp -f $path/cpbackupedited $path/cpbackup&#8221;);</p>
<p># Open The Mail Program<br />
open(MAIL,&#8221;|$mailprog -t&#8221;);<br />
print MAIL &#8220;Content-Type: text/html; charset=iso-8859-1\n&#8221;;</p>
<p>print MAIL &#8220;To: $sendto_email\n&#8221;;<br />
print MAIL &#8220;From: $sender_email\n&#8221;;</p>
<p>print MAIL &#8220;Subject: cpbackup file changed and restored\n&#8221;;</p>
<p>print MAIL &#8220;&lt;b&gt;The cpbackup file was changed back to the original and has been automatically replaced with the edited version.&lt;/b&gt;&lt;br&gt;&lt;br&gt;\n\n&#8221;;</p>
<p>close (MAIL);</p>
<p>}</p>
<p>if ($diff2 ne &#8220;0&#8243;) {</p>
<p># Open The Mail Program<br />
open(MAIL,&#8221;|$mailprog -t&#8221;);<br />
print MAIL &#8220;Content-Type: text/html; charset=iso-8859-1\n&#8221;;</p>
<p>print MAIL &#8220;To: $sendto_email\n&#8221;;<br />
print MAIL &#8220;From: $sender_email\n&#8221;;</p>
<p>print MAIL &#8220;Subject: cpbackup file changed\n&#8221;;</p>
<p>print MAIL &#8220;&lt;b&gt;The cpbackup file has been changed and no longer matches the original file. You will need to redo your custom work.&lt;/b&gt;&lt;br&gt;&lt;br&gt;\n\n&#8221;;</p>
<p>close (MAIL);</p>
<p>} </p>
<p>Lastly, we need to setup our crontab to run this watcher script *after* &#8216;upcp&#8217; runs, but *before* the cpbackup script runs. Edit the crontab (as root, obviously):</p>
<p> </p>
<p>Quote:<br />
crontab -e </p>
<p>Look for the line with &#8216;/scripts/upcp&#8217; and change it:<br />
Quote:<br />
40 0 * * * /scripts/upcp</p>
<p>becomes</p>
<p>40 0 * * * /scripts/upcp; /scripts/watchcpbackup </p>
<p>Save it, and you&#8217;re done!<br />
If you want to automate the rsyncing of your files, take a peek at the following HOW-TO, which is clear and works great:</p>
<p><a href="http://sharethis.com/item?&wp=2.6&amp;publisher=eaf0515d-6ba4-4ac9-9359-d170d1179dd2&amp;title=Cpanel+make+full+backups+work+with+rsync&amp;url=http%3A%2F%2Fwww.hostingbkk.com%2F2009%2F04%2F01%2Fcpanel-make-full-backups-work-with-rsync%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hostingbkk.com/2009/04/01/cpanel-make-full-backups-work-with-rsync/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dedicated Servers – Backup and Recovery Strategies</title>
		<link>http://www.hostingbkk.com/2009/04/01/dedicated-servers-%e2%80%93-backup-and-recovery-strategies/</link>
		<comments>http://www.hostingbkk.com/2009/04/01/dedicated-servers-%e2%80%93-backup-and-recovery-strategies/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 21:09:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Dedicated Server]]></category>

		<category><![CDATA[Add new tag]]></category>

		<category><![CDATA[Backup]]></category>

		<guid isPermaLink="false">http://www.hostingbkk.com/?p=342</guid>
		<description><![CDATA[What kind of backup recovery strategy should a company have for its dedicated server? Web hosting companies have been debating this architecture since their existence began.  It is really a question pondered by the whole IT community. There are many right solutions, dependent on your company’s ability to handle downtime.  The correct solution for you [...]<script type="text/javascript">SHARETHIS.addEntry({ title: "Dedicated Servers – Backup and Recovery Strategies", url: "http://www.hostingbkk.com/2009/04/01/dedicated-servers-%e2%80%93-backup-and-recovery-strategies/" });</script>]]></description>
			<content:encoded><![CDATA[<p>What kind of backup recovery strategy should a company have for its dedicated server? Web hosting companies have been debating this architecture since their existence began.  It is really a question pondered by the whole IT community. There are many right solutions, dependent on your company’s ability to handle downtime.  The correct solution for you will factor in the amount of redundant protection you need against the overall cost.</p>
<p><img src="http://hostingbkk.com/images/cdr4.jpg" alt="Dedicated_Backup" /></p>
<p>Before we discuss the different options for backing up and recovering your dedicated server, we should mention that the server hardware, data center, and fiber connection are all critical to reliability. This article is specifically focused on strategies to backup and recover your server’s data.<br />
At a minimum, you can create a partition in your hard drive and backup your server weekly or monthly. There is no cost to this kind of solution, but the downsides are obvious. If your hard drive crashes, you will lose your backup as well. This kind of solution is only recommended if you can afford to lose all of your data, which most web hosting companies cannot.<br />
Next, you can contract a remote backup service to set up offsite backups. These backups can be run daily, weekly, or monthly. The cost of this solution is around $30-$50/month depending on the web hosting provider. This option gives you a solid backup in case your hard drive crashes. The downside is that recovery time will take 6-12 hours or more depending on how much data you have. The data has to be manually copied over, and this is a slow process. If you can afford the cost, this solution is part of an overall backup system, but it is not recommended as your only solution.<br />
The next backup option is to have a second hard drive installed on your server and have it set up to do daily, weekly, or monthly backups. Most web hosting companies that provide dedicated servers will charge between $15-$30 for a second hard drive. This is a nice compliment to the previous solution if you have the budget for both. The recovery time is faster then a remote backup. But unlike a remote backup, if your dedicated server or the datacenter are down, then you cannot access the backup. For most small web hosting companies this is not a problem. If their entire server or datacenter are down, they have larger issues to worry about. We recommend this as a complimentary option with a remote backup.<br />
Next, a web hosting company can use mirrored RAID drives. This option will cost $50-$80/month more, but it provides the fastest possible recovery in case of a hard drive crash. You can just reboot using the mirrored drive, and you are back in business. The cost is a little higher, but this is a nice luxury. The downside of this option is that if your server is unavailable, then you still cannot reach your data. Additionally, if the hard drive becomes corrupted it will also corrupt your backup. This is why we recommend mirrored drives as part of a larger solution that includes other backup systems.<br />
Finally, there are mirrored servers. This entails the largest cost and is really not necessary, except for those web hosting companies that can tolerate no downtime at all. In this scenario, if the server itself dies you can have another server ready to take the load. In fact, if your company is large enough, you might already need this kind of solution for performance. Some websites require multiple servers to handle the performance, and it is load balanced across them. In this case, if a server dies the system still runs. This is the best solution but it is not always necessary.  And, of course it is costly.<br />
We recommend a weekly remote backup to provide you with a fail safe version. Even if the datacenter burns down, you will have a copy of your data. To this we would add either mirrored RAID drives or a second hard drive, depending on your hosting company’s needs. If you are more worried about recovery time from hard drive crashes, which is the most frequent hardware problem with dedicated servers, then go with the RAID drives. If you are more worried about the hard drive getting corrupted, go with the second hard drive.</p>
<p>We hope this article provides you with the information you need to adequately back up your dedicated server!</p>
<p><a href="http://sharethis.com/item?&wp=2.6&amp;publisher=eaf0515d-6ba4-4ac9-9359-d170d1179dd2&amp;title=Dedicated+Servers+%E2%80%93+Backup+and+Recovery+Strategies&amp;url=http%3A%2F%2Fwww.hostingbkk.com%2F2009%2F04%2F01%2Fdedicated-servers-%25e2%2580%2593-backup-and-recovery-strategies%2F">ShareThis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.hostingbkk.com/2009/04/01/dedicated-servers-%e2%80%93-backup-and-recovery-strategies/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
