Enable syslogd to Accept Remote Messages on Loghosts Only

Is this machine the central log server for your organization? If so, edit the file /etc/sysconfig/syslog. Add or correct the following line: SYSLOGD_OPTIONS=”-m 0 -r -s example.com “ Where example.com is the name of your domain. If the machine is not a log server, edit /etc/sysconfig/syslog, and instead add or correct the line: SYSLOGD_OPTIONS=”-m 0″ By default, RHEL5’s syslog does […]

Send Linux server Logs to a Remote Loghost

Edit /etc/syslog.conf. Add or correct the line: *.*                        @loghost.example.com Where loghost.example.com is the name of your central log server. It is particularly important that logs be stored on the local host in addition to being sent to the loghost, because syslogd uses the UDP protocol to send messages over […]

How to Set Password Expiration Parameters in Linux ?

Edit the file /etc/login.defs to specify password expiration settings for new accounts.Add or correct the following lines: PASS_MAX_DAYS 60 PASS_MIN_DAYS 7 PASS_MIN_LEN 14 PASS_WARN_AGE 7 For each existing human user USER , modify the current expiration settings to match these: # chage -M 60 -m 7 -W 7 USER Users should be forced to change their passwords, in order to […]

Limit su Access to the Root Account

1. Ensure that the group wheel exists, and that the usernames of all administrators who should be allowed to execute commands as root are members of that group. # grep ^wheel /etc/group 2. Edit the file /etc/pam.d/su. Add, uncomment, or correct the line: auth required pam_wheel.so use_uid The su command allows a user to gain the privileges of another user […]

RedHat Software Package Updates with yum

The yum update utility can be run by hand from the command line, called through one of the provided  front-end tools,or configured to run automatically at specified intervals. Manually Check for Package Updates The following command prints a list of packages that need to be updated: # yum check-update To actually install these updates, run: # yum update Configure Automatic […]

Ensure Red Hat GPG Key is Installed

To ensure that the system can cryptographically verify update packages (and also connect to the Red Hat Network to receive them if desired), run the following command to ensure that the system has the Red Hat GPG key properly installed: $rpm -q –queryformat “%{SUMMARY}\n” gpg-pubkey The command should return the string:    gpg(Red Hat, Inc. (release key <security@redhat.com>) To verify that the […]

Configure Connection to the RPM Repositories

The first step in configuring a system for updates is to register with the Red Hat Network (RHN). For mostsystems,this is done during the initial installation. Successfully registered systems will appear on the RHN web site. If the system is not listed, run the Red Hat Network Registration tool, which can be found in the Applications menu under System Tools […]

Step-By-Step Configuration of NAT with IP-tables

Requirements: CPU – PII or more… OS – Any Linux distribution. Software – – Iptables Network Interface Cards(NIC): 2 Here is my considerations: Replace xx.xx.xx.xx with your WAN IP Replace yy.yy.yy.yy with your LAN IP (i.e.,, as suggested by itjagat.com) WAN = eth0 with public IP xx.xx.xx.xx LAN = eth1 with private IP yy.yy.yy.yy/ Step by […]

Create MySQL database via command line.

Create quickly database in your MySQL installation for some project you are working on. Follow this quick guide to do. We’re going to create a database named ‘itjagat’ with a user named itjagat_user and a password of ‘itjagat123’. We’re going to give him all privileges on this database and allow him to connect only from localhost.