Click Add

Saturday, April 5, 2014

Backup and Restore - Linux Server OS

Backup and Restore - Linux Server OS

One of the most important keys to not losing data in the event of hardware failure, misconfiguration, hackers and simple mistakes is to keep regular backups of the data you want to preserve. The articles here are design to assist a Server Admin create and restore backups of the data. In addition to the articles we have a few recommendations:
  • Make regular backups at specified intervals.
  •  Store backups on a different device than the original data.
  • Keep logs of backup success and failure.
  • Test restoring the backups at regular intervals.
  • Automate the process as much as possible.
We hope that following these tips will aid you as much as possible when you are in need of a restore.


Backing Up and Restore Your Server
Backing Up and Bare Metal Restore


Backing Up and Restore Your Server ----Backup Your Server's OS

Backing Up and Restore Your Server ----Restore Your Server's OS


Backing Up and Restore Your Server ----Restore Your Server's OS

Restore Your Server's OS From a Backup

  
In order to restore your server from the previously created tarball the server must have the same Operating System version loaded on it. This particular method of backup and restore is not meant for bare metal projects that need to restore an Operating System to an empty hard drive. It was actually designed to move a configured Operating System from one hardware platform to another, but also works well for rolling back an operating system to a previous configuration.

Once you have a working Operating System either on a new hardware platform or the same hardware platform move the tarball to the server you want to restore. If you stored the tarball on a USB device or other external storage just reattach the device and mount it. If the tarball is on another linux server use commands like this to copy it to the new server’s hard drive:

mkdir /backups
scp root@original_server:/backups/backup.tgz /backups

Of course replace "original_server" with the appropriate IP address.

Enter the root users password and the transfer will begin.

Once the transfer has completed run this command to extract the tarball thereby restoring the Operating System that the tarball contains:

tar xvpfz /backups/backup.tgz -C /

Complete the process with a reboot and troubleshoot any errors that may come up.

Backing Up and Restore Your Server ----Backup Your Server's OS

Backing Up and Restore Your Server
   
Backup Your Server's OS
   

Making a backup of your Linux Operating System is a very simple process that uses tools included in every linux installation.

The first step is to create a location to store the backup. For this article we're going to store the backup on the same hard drive as the installed operating system, but you can attach USB devices like thumb drive and external hard drives and even special storage like iSCSI and NFS mounted device to store the backup.

Once you are logged into the server and at a command line make the directory to store the backup in an organized way such as:

mkdir /backups

Now we will create a compressed version of the Operating System in one single file (tarball) using the tar command.

For RedHat, CentOS and Fedora or any Operating System based on these linux flavors run the following command:

tar cvpzf /backups/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backups --exclude=/mnt --exclude=/sys --exclude=/boot/grub --exclude=/etc/fstab --exclude=/etc/sysconfig/network-scripts/ --exclude=/etc/udev/rules.d/70-persistent-net.rules /

For Debian or Ubuntu run the following command:

tar cvpzf /backups/backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backups --exclude=/mnt --exclude=/sys --exclude=/boot/grub --exclude=/etc/fstab --exclude=/etc/network/interfaces --exclude=/etc/udev/rules.d/70-persistent-net.rules /

Once the command completes the tarball will be located at /backups/backup.tgz

***HINT: You can change the name of the tarball file with a date identifier and keep multiple versions or "snapshots" of your server's configuration.

Friday, April 4, 2014

Server Security - How to create a strong Password

Server Security  - Basics Security

Using Strong Passwords


Strong passwords for all accounts on a server are the first line of defense against intrusion. It is critical that not only your root user password uses a strong password but every user who has access to login to your server in any way needs to maintain a strong password. This includes accounts created in control panels like Webmin, cPanel and Plesk.

A strong password should consists at at least 10 characters but 15-20 would be ideal. The characters should be random and should be mixed. Mixed characters means that the password consists of capital letters A-Z, lower case letters a-z, numbers 0-9, and character like %$*@?<+, etc... Not all applications will accept all characters so the password should be tailored for the application you're logging in to.

Creating a password you can remember is sometimes desired. It is possible to create a strong password with the memory queues you need to remember the password and be able to type the password when needed. One such device is to create a password from a phrase. For example let's start password creation for this example with the phrase "the happy brown dog". After counting the characters we know that we have 16 character, we cannot use spaces so they are not counted.

  • First we rewrite the phrase with no blank spaces. This results in "thehappybrowndog".

  • Secondly we should capitalize letters in places that we would remember the positioning of, for example we could capitalize the first letter of each word "TheHappyBrownDog".

  • Thirdly we should replace some letters with numbers and characters. Some common easy to remember replacements are a -> @, e -> 3, h -> 4, i -> !, i -> 1, p -> 9, etc...  You can make up your own replacements as long as you'll remember them. So implementing a replacement technique we could change the password to "Th3H@ppyBr0wnD0g".

  • Lastly we want to throw some random characters before the password, after the password and if you can remember the combination, you can even put them between words in the password. An example of this would be "Th3H@ppyBr0wnD0g!@#" or "!!!Th3H@ppyBr0wnD0g" or "123Th3H@ppyBr0wnD0g"!@#". As a rule when I add the random characters I like to use 3-5 that are geographically related on the keyboard. When I say "geographically related" I mean that they are adjacent or next to each other in some way.

Using these techniques you can ensure your server will be much more difficult for a brute force hacker to penetrate.

Connecting via SSH

Connecting via SSH


Introduction

Secure Shell (SSH) is a UNIX-based and protocol for securely getting access to a remote computer. Connecting with an SSH client provides a command line interface to manage and configure the operating system. When you use SSH to connect to your server both ends of the client/server connection are authenticated using a digital certificate, and passwords are protected by being encrypted.

Getting an SSH client

When connecting to your Linux server from a Microsoft Windows desktop PC you'll need to download an SSH client. By far the most popular SSH client is PuTTY. PuTTY is a free software licensed under the open-source guidelines. You can use your favorite search engine to search for a downloadable version of PuTTY.exe or you can download it directly from the maintainers web site.

Downloading the Putty Suite of software will allow you to create and use SSH keys when connecting to your server, but for this demonstration all you need is Putty.exe. Once you have downloaded the software, execute PuTTY.exe and you will be presented with the standaard Putty connection window.

Connecting to your server

Once the PuTTY window launches, enter the details provided for your server. Enter teh IP address into the "Host Name" field. Ansure the radial buttn marked SSH is selected, You can enter a name in the "Saved Sessions" filed and click "Save" to keep this session for later.

Connecting via SSH
 
Introduction

Secure Shell (SSH) is a UNIX-based and protocol for securely getting access to a remote computer. Connecting with an SSH client provides a command line interface to manage and configure the operating system. When you use SSH to connect to your server both ends of the client/server connection are authenticated using a digital certificate, and passwords are protected by being encrypted.

 Getting an SSH client

When connecting to your Linux server from a Microsoft Windows desktop PC you'll need to download an SSH client. By far the most popular SSH client is PuTTY. PuTTY is a free software licensed under the open-source guidelines. You can use your favorite search engine to search for a downloadable version of PuTTY.exe or you can download it directly from the maintainers web site.

Downloading the Putty Suite of software will allow you to create and use SSH keys when connecting to your server, but for this demonstration all you need is Putty.exe. Once you have downloaded the software, execute PuTTY.exe and you will be presented with the standaard Putty connection window.

Connecting to your server

Once the PuTTY window launches, enter the details provided for your server. Enter teh IP address into the "Host Name" field. Ansure the radial buttn marked SSH is selected, You can enter a name in the "Saved Sessions" filed and click "Save" to keep this session for later.

Once the details is entered, click "Open" and you should be presented with an SSH key warning, which if this is the first time you are connecting to this host "yes" would be the correct reply. The command line login screen is the next screen you can access.

 
Logging In

In the command line windows presented, enter teh user name provided with your server details. This will normally be "root", unless you're connecting to FreeBSD or additional security has been applied. Press enter after you type the user name then type the password provided when prompted for the password. Unlike when entering your username, you will not see the characters or any indication that you are typing anything, this is all hidden for security. 

If all went well you are now logged in to your Linux server.

 
Congratulations!!!

If you were presented with the password prompt a second time, try retyping your password, if you're still not successful, contact your server provider for more assistance. 
 Once the details is entered, click "Open" and you should be presented with an SSH key warning, which if this is the first time you are connecting to this host "yes" would be the correct reply. The command line login screen is the next screen you can access.


Logging In

In the command line windows presented, enter teh user name provided with your server details. This will normally be "root", unless you're connecting to FreeBSD or additional security has been applied. Press enter after you type the user name then type the password provided when prompted for the password. Unlike when entering your username, you will not see the characters or any indication that you are typing anything, this is all hidden for security.

If all went well you are now logged in to your Linux server.


Congratulations!!!

If you were presented with the password prompt a second time, try retyping your password, if you're still not successful, contact your server provider for more assistance.

cPanel/WHM for web hosting

cPanel is a graphical web-based control panel that helps you quickly and easily manage your website and hosting account. cPanel gives you complete control over a vast amount of functions, streamlining useful processes such as:

  •     Creating databases
  •     Managing website files
  •     Setting up email accounts & auto responders

cPanel has grown to become the most popular web hosting control panel, running millions of websites around the world. cPanel was created to give server and website owners control over their properties. Whether you’re managing one, or hundreds, of servers and/or websites, cPanel’s user friendly point-and-click interface allows you to customize your web hosting experience to fit your needs.
   
  •     Using a Smarthost to Deliver Email    
  •     Migrate Site from cPanel to cPanel
Linux
   
web hosting company offers a wide variety of linux flavors. Whether your a cutting edge user of Ubuntu or Fedora or you favor the tried and tested stability of Debian and CentOS, web hosting offer what you need to accomplish your task.
   
  •     Getting Connected To your Server     
  •     Uploading Content to your Server     
  •     ISC BIND Name Server     
  •     IPTables Firewall     
  •     Server Security     
  •     Webmin     
  •     Backup and Restore

Windows
   
    Web hosting company offers a wide variaiety or Microsoft Windows server operating systems. Web hosting companyhave been working with Microsoft Windows Since the dawn of the Winders Serer operating system and currently offer version in the Microsoft Windows Server 2003, 2008 R2 and 2012 line of products.

  •     Getting Connected To Your Windows Server    
  •     Microsoft DNS Server    
  •     Hyper-V
 

Wednesday, March 19, 2014

How do I set up POP or IMAP E-mail on an Android Device?

Set Up POP or IMAP E-Mail on an Android Mobile Phone

From the home screen, tap Applications > Settings > Accounts & sync > Add account > Manual setup.
On the Incoming settings screen, in the Protocol drop-down menu, select IMAP or POP3. We suggest you select IMAP because it supports more features.
In the Email address and Username text boxes, enter your full e-mail address, for example tony@contoso.com, and then select Next. Your user name is the same as your e-mail address.
In the Password text box, enter your password.
In the IMAP server or POP3 server text box, enter your IMAP or POP server name. For information about how to look up the server settings you need to complete this step and other steps in this procedure, see “How do I find the server settings” later in this topic.
In the Security type drop-down menu and Server port text boxes, specify the POP or IMAP settings that you looked up in step 5, and then tap Next. Your e-mail application will check your IMAP or POP settings.
On the Outgoing server settings screen, the Login required option should be selected for you, and the Username and Password text boxes should be filled in.
In the SMTP server text box, enter the SMTP server name you looked up in step 5.
In the Security type drop down menu and Server port text box, specify the SMTP settings that you located in step 5, and click Next.
In the Account name, text box, enter a name your account (for example “Office 365 email” or “Work email”). In the Your name text box, enter the name you want displayed when you send e-mail to others (for example “Tony Smith”), and then select Finish Setup.