CentOS: Configure network

CentOS Logo

This tutorial is intended for system administrators wanting to either change the IP address or add additional LAN cards (NIC) on their CentOS 5 system. There are a couple of ways to configure the network card using the command line but only some commands will take immediate effect on kernel. If you are doing this remotely remember that you will lose connectivity or if your configuration on your network is incorrect be unable to connect.

Configure network with immediate effect

Using a single command line to configure the network

[or]

Continue reading “CentOS: Configure network”

Installing SSMTP on CentOS 5.6

CentOS Logo This tutorial will guide you through installing SSMTP on CentOS 5.6

SSMTP is an extremely simple MTA to get mail off the system to a mail hub. It contains no suid-binaries or other dangerous things – no mail spool to poke around in, and no daemons running in the background. Mail is simply forwarded to the configured mailhost. Extremely easy configuration. WARNING: the above is all it does; it does not receive mail, expand aliases or manage a queue.

Firstly lets install the EPEL repository as SSMTP is not native to CentOS 5.6 base installations.

Install the EPEL i386 YUM Repository

# rpm -Uvh http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm

Remove Sendmail as the binaries can conflict.

Now install SSMTP

Continue reading “Installing SSMTP on CentOS 5.6”

Installing DenyHosts on CentOS 5.6

If you have a CentOS server with public IP address, then the server is probably vulnerable to attacks from outside. Brute force attacks are usually done by forcing entry [log in] with the variation of the username and password repeatedly.

What is DenyHosts?

DenyHosts is a script intended to be run by Linux system administrators to help thwart SSH server attacks (also known as dictionary based attacks and brute force attacks).

If you’ve ever looked at your ssh log (/var/log/secure on CentOS) you may be alarmed to see how many hackers attempted to gain access to your server. Hopefully, none of them were successful (but then again, how would you know?). Wouldn’t it be better to automatically prevent that attacker from continuing to gain entry into your system?

Read more on the DenyHosts website: http://denyhosts.sourceforge.net/
Continue reading “Installing DenyHosts on CentOS 5.6”

How to check your CentOS version

CentOS Logo

Most Red Hat-based distributions, like CentOS, should have a file called redhat-release which will contain the CentOS version.

or

and finally