Security for VPS
OS Virtualization , Parallel Virtuozzo Containers and VZFS .
Virtualization , Parallel Virtuozzo Containers and VZFS .
OS Virtualization : It means Virtualization at OS or Kernel Level. This creates isolated containers on a single physical server and OS instance to utilize hardware, software, datacenter and management efforts with maximum efficiency.
In short we can say that it creates a separate runtime environments all within the same overall OS.
What is Parallel Virtuozzo Containers?
Parallels Virtuozzo Containers is a patented OS virtualization solution. Virtuozzo Containers 4.0 creates isolated partitions or Containers on a single physical server and OS instance to utilize hardware, software, data center and management effort with maximum efficiency.
Parallel Containers runs the same OS kernel as the host system (Linux / Windows ,etc.). This single-kernel implementation technology allows to run Containers with a almost zero overhead. Thus, Virtuozzo Containers offer higher efficiency and manageability than traditional virtualization technologies.
Lets See the File system of this technology.
Virtuozzo File System (VZFS):
VZFS is a file system that shares common files among multiple Containers with flexibility. It is allows users to modify, update, replace, and delete shared files. When a user modifies a shared file, VZFS creates a private copy of the file transparently for the user. Thus, the modifications do not affect the other users of the file.
Benefits of VZFS are as following:
• It saves memory required for executables and libraries.
• Sharing memory improves scalability and total system performance.
• Disk quota enables the administrator to limit disk resources available to a Container on-the-fly, in the same manner as the standard disk quota system works on a per-user basis. Disk quota for users and groups inside Containers is also supported.
• It saves disk space. A typical Linux server installation occupies several hundred MBytes of disk space. Sharing the files allows you to save up to 90% of disk space;
• VZFS does not require having different physical partitions for different Containers or creating a special “file system in a file” setup for a Container. This significantly simplifies disk administration
How does Rsync works?
Considering the fact of uncertain down time due to various reason like FSCK or Hard Drive being crashed one can always backup all the files on the remote server and secure the data, Rsync is widely used technology in the hosting industry, files are stored in .tar.gz format which occupies less space on the server in terms of huge files.
Let’s check some important settings to perform backup on through cPanel/WHM.
1. Create an account on the remote server assigning ftp username and password.
2. Login to your VPS (Virtual Private Server) WHM (Web host manager) using the root password.
3. Find “Configure Backup” Enable the Backup Status.
4. Backup Type Remote FTP (Accounts Only) Check the circle
5. Remote FTP Host (Remote FTP Backup Only) “mention the IP address
6. FTP Backup User (Remote FTP Backup Only)
7. FTP Backup Password (Remote FTP Backup Only)
8. FTP Backup Directory (optional, a directory called cpbackup in the FTP account’s directory root will be used if none specified)
examples: /home/fred/cpbackup, /backup/cpbackup, /files/cpbackup) (Remote FTP Backup Only)
9. Backup Destination (this should be a directory/NFS/Coda mount with at least twice the space of all your /home* partitions. Setting this to /home is a very bad idea.
10. Save changes you have now successfully configured the backup as per your requirement.
How to configure backup on plain server?
We can set ssh key which will directly copy files and folders on a backup server without asking any authentication. This involves Rsync technology where as files are stored in the regular format occupying huge space as compare to cPanel backup.
Using the rSync backup technology, we can execute a script i.e automation which can be scheduled as per our requirement. Rsync compiles everything including permissions, Rsync backup will be incremental avoiding replication of the files. This allows us to customize the backup.
For example:
We have backup /home/user directory on daily basis from server host.server.com to /backup/host directory of backup.server.com
Set sshkey authentication
backup.server.com
generate ssh-key on backup.server.com
using command ssh-keygen
On host.server.com
mkdir /root/.ssh
allow permission chmod 700 /root/.ssh
copy id_rsa.pub from backup.server.com server to host.server.com’s /root/.ssh/authorized_keys
Run script
backup /home/user of host.server.com to /backup/host/ of backup.server.com
vi /home/backup.sh
insert
rsync -va host.server.com:/home/user /backup/host/
allow permission chmod 700 backup.sh
On backup server set cron for backup /home/user on daily basis
for daily
crontab -e
@daily sh /home/backup.sh
Save cron job and restart service crond, Virtual Private Server, SSH




















