Update /etc/profile.d without a reboot


To update /etc/profile.d/ without doing a reboot.

Just do the below.

source /etc/profile.d/profilefile

Advertisements

yum/rpm failure DB RUNRECOVERY


If you get the below error when trying to use yum or rpm install command

Loaded plugins: security
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery

Try running the below to resolve

rm -f /var/lib/rpm/__db*

rpm --rebuilddb

Drop Sync/DDOS Attack


Good info on tuning sysctl conf for syn

ServerAdminz Linux Blog

1. Find.. to which IP address in the server is targeted by the ddos attack

netstat -plan  | grep  :80 | awk ‘{print $4}’ | cut -d: -f1 |sort |uniq -c

2. Find… from which IPs, the attack is coming

netstat -plan  | grep  :80 | awk ‘{print $5}’ | cut -d: -f1 |sort |uniq -c

In csf:

vi /etc/csf/csf.conf

SYNFLOOD is disabled by default. If you are not receiving any sort of attack, there is no need to enable it. If you are expecting an attack, enable it and set the rules a bit strict, like
SYNFLOOD_RATE = “5/s”
SYNFLOOD_BURST = “3”
my eg:
SYNFLOOD = “1”
SYNFLOOD_RATE = “30/s”
SYNFLOOD_BURST = “10”

SYNFLOOD

SYNFLOOD is disabled by default. If you are not receiving any sort of attack, there is no need to enable it. If you are expecting an attack, enable it and set the rules a bit…

View original post 446 more words