Disable Firewall on RHEL / CentOS / RedHat Linux

How Do I Disable Firewall?

First login as the root user.
Next enter the following three commands to disable firewall.
# service iptables save
# service iptables stop
# chkconfig iptables off
If you are using IPv6 firewall, enter:
# service ip6tables save
# service ip6tables stop
# chkconfig ip6tables off

Disabling SSH Password Authentication and Root Login

You just strengthened the security of your Linode by adding a new user and generating SSH keys. Now it's time to make some changes to the default SSH configuration. First, you'll disable password authentication to require all users connecting via SSH to use key authentication. Next, you'll disable root login to prevent the root user from logging in via SSH. These steps are optional, but are strongly recommended.
Note
You may want to leave password authentication enabled if you connect to your Linode from many different desktop computers. That will allow you to authenticate with a password instead of copying the private key to every computer.
Here's how to disable SSH password authentication and root login:
  1. Open the SSH configuration file for editing by entering the following command:
    sudo nano /etc/ssh/sshd_config
    
Note
If you see a message similar to -bash: sudo: command not found, you'll need to install sudo on your Linode. To do so, log in as root by entering the sucommand, and type the root password when prompted. Next, install sudo by entering the following command: apt-get install sudo. After sudo has been installed, log out as the root user by entering the exit command.
  1. Change the PasswordAuthentication setting to no as shown below. Verify that the line is uncommented by removing the # in front of the line, if there is one.:
    PasswordAuthentication no
    
  2. Change the PermitRootLogin setting to no as shown below:
    PermitRootLogin no
    
  3. Save the changes to the SSH configuration file by pressing Control-X, and then Y.
  4. Restart the SSH service to load the new configuration. Enter the following command:
    sudo service ssh restart
    
After the SSH service restarts, the SSH configuration changes will be applied.

Using SSH Key Pair Authentication

You've used password authentication to connect to your Linode via SSH, but there's more a secure method available: key pair authentication. In this section, you'll generate a public and private key pair using your desktop computer and then upload the public key to your Linode. SSH connections will be authenticated by matching the public key with the private key stored on your desktop computer - you won't need to type your account password. When combined with the steps outlined later in this guide that disable password authentication entirely, key pair authentication can protect against brute-force password cracking attacks.
Here's how to use SSH key pair autentication to connect to your Linode:
  1. Generate the SSH keys on a desktop computer running Linux or Mac OS X by entering the following command in a terminal window on your desktop computer. PuTTY users can generate the SSH keys by following the instructions in our PuTTY guide.
    ssh-keygen
    
  2. The SSH keygen utility appears. Follow the on-screen instructions to create the SSH keys on your desktop computer. To use key pair authentication without a passphrase, press Enter when prompted for a passphrase.
Note
Two files will be created in your ~/.ssh directory: id_rsa and id_rsa.pub. The public key is id_rsa.pub - this file will be uploaded to your Linode. The other file is your private key. Do not share this file with anyone!
  1. Upload the public key to your Linode with the secure copy command (scp) by entering the following command in a terminal window on your desktop computer. Replaceexample_user with your username, and 123.456.78.90 with your Linode's IP address. If you have a Windows desktop, you can use a third-party client likeWinSCP to upload the file to your home directory.
    scp ~/.ssh/id_rsa.pub example_user@123.456.78.90:
    
  2. Create a directory for the public key in your home directory (/home/yourusername) by entering the following command on your Linode:
    mkdir .ssh
    
  3. Move the public key in to the directory you just created by entering the following command on your Linode:
    mv id_rsa.pub .ssh/authorized_keys
    
  4. Modify the permissions on the public key by entering the following commands, one by one, on your Linode. Replace example_user with your username.
    chown -R example_user:example_user .ssh
    chmod 700 .ssh
    chmod 600 .ssh/authorized_keys 
    ssh-add 
The SSH keys have been generated, and the public key has been installed on your Linode. You're ready to use SSH key pair authentication! To try it, log out of your terminal session and then log back in. The new session will be authenticated with the SSH keys and you won't have to enter your account password. (You'll still need to enter the passphrase for the key, if you specified one.)

Magento TopMenu is missing / Home Button

Go to: \app\design\frontend\base\default\template\page\html\topmenu.phtml

<?php if($_menu): ?><div class="nav-container">
    <
ul id="nav">
        <
li><a href="<?php echo $this->getUrl('') ?>">Home</a></li>
        
<?php echo $_menu ?>
        <?php 
echo $this->getLayout()->createBlock('cms/block')->setBlockId('menu')->toHtml(); ?>
    
</ul>
</
div><?php endif ?>