Archive for the tag 'check'

How to 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
SBDavid

ChkServd TCP check failure threshold

ChkServd TCP check failure threshold

Main >> Server Configuration >> Tweak Settings

The number of times a ChkServd TCP check must fail before notification is sent and the service is restarted. On heavily loaded systems these types of service checks fail occasionally, producing erroneous indications that services are down.

A value of 3 or higher is recommended for most systems.

SBDavid

Check the most IP connect to server

Check the most IP connect to server

netstat -an | grep :80 | awk ‘{print $5}’ | sed -e s/’:.*’/”/g | sort | uniq -c

or

netstat -anp |grep ‘tcp\|udp’ | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n

or

netstat -ntu | awk ‘{print $5}’ | cut -d: -f1 | sort | uniq -c | sort -n
SBDavid

How to check SELinux Status

How to check SELinux Status

Use the command below to check the current status.

# sestatus
SELinux status: enabled
SELinuxfs mount: /selinux
Current mode: permissive
Mode from config file: permissive
Policy version: 21
Policy from config file: targeted

We can also change the policy using setenforce command.

setenforce 0 - to disable
setenforce 1 - to enable

# setenforce –help
usage: setenforce [ Enforcing | Permissive | 1 | 0 ]

How to check if csf will work on your server

One you have downloaded CSF firewall and installed it, you can run the below command to check the status and the results.

# /etc/csf/csftest.pl
Testing ip_tables/iptable_filter…OK
Testing ipt_LOG…OK
Testing ipt_multiport/xt_multiport…OK
Testing ipt_REJECT…OK
Testing ipt_state/xt_state…OK
Testing ipt_limit/xt_limit…OK
Testing ipt_recent…OK
Testing ipt_owner…OK
Testing iptable_nat/ipt_REDIRECT…OK

RESULT: csf should function on this server

Next »