Home > Whitepapers > Useful Redhat 7.2 or later pointers
Bookmark and Share

Useful Redhat 7.2 or later pointers

Posted on March 03, 2004 | Filed in Articles

By: Ranjan S. Chari

Note: Most commands here would require you to have a superuser status.

 

To see what services are running on your system

# chkconfig –list

By default this file is located in your /sbin directory.

or

# netstat -a | grep LISTEN

This will give you a list of all listening devices.

To shutdown uneeded services so that no service sits around listening to ports when it’s not required

Assuming that xinetd is running on your system and controls the startup of a relevant service when it’s requested:

Look at the directory:

# /etc/xinetd.d

The directory contains files which are configuration file for services that the xinetd daemon controls.

Let’s say you want to turn telnet off.

Examine the telnet file.

You see something like so:

service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = no
}

replace the second last line disable=no with disable=yes

You’ll require a xinetd restart. So go to the directory that contains the xinetd daemon.

# cd /etc/rc.d/init.d/

And restart the application:

./xinetd restart

To create your custom telnet welcome message:

Edit the file /etc/issue.net

Place your own custom message.

The next time someone telnets in, he/she’ll get that message.

To figure out which Redhat version you are using

#rpm -q redhat-release

To diable guest and anonymous FTP access to your Redhat server if using WuFTPd

Edit the file: /etc/ftpaccess

From the line:

# User classes…

Remove guest and anonymous.

To change your IP Address

Edit the file:

/etc/sysconfig/network-scripts/ifcfg-eth0

To make applications load up at bootup

Edit the file:

/etc/rc.d/rc.local

Add in the command to load up your application at the very end of the file.

To list IP address for all devices on the machine

#/etc/sbin/ifconfig

Finding an IP address of a Hostname

#dig xyz.abc.com