#!/bin/bash if [ ! -f /bin/mail ]; then yum -y install mailx fi cd /root rm -rf rkhunter-1.4.0.tar.gz rm -rf rkhunter-1.4.0 wget http://pkgs.fedoraproject.org/repo/pkgs/rkhunter/rkhunter-1.4.0.tar... tar -xzf rkhunter-1.4.0.tar.gz cd rkhunter-1.4.0 ./installer.sh --install /usr/local/bin/rkhunter --versioncheck /usr/local/bin/rkhunter --update rm -rf /root/rkhunt er-1.4.0 rm -rf /root/rkhunter-1.4.0.tar.gz cd /etc/cron.daily/ echo '#!/bin/bash' >rkhunter.sh echo '/usr/local/bin/rkhunter --versioncheck' >> rkhunter.sh echo '/usr/local/bin/rkhunter --update' >> rkhunter.sh echo '/usr/local/bin/rkhunter --cronjob --report-warnings-only | mail -s "Rkhunter daily scan results for `hostname`" root' >> rkhunter.sh chmod 755 /etc/cron.daily/rkhunter.sh yum install -y sysstat iotop libpcap rpm -ih http://pkgs.repoforge.org/iftop/iftop-0.17-1.el6.rf.x86_64.rpm rpm -ih http://pkgs.repoforge.org/multitail/multitail-5.2.9-1.el6.rf.x86_64.rpm
Wednesday, April 30, 2014
Group Install: iftop,multitail,sysstat,rkhunter
Chkrootkit Installation
#!/bin/bash if [ ! -f /bin/mail ]; then yum -y install mailx yum -y install glibc-static fi cd /root rm -rf chkrootkit-0.49 rm -rf chkrootkit-0.49.tar.gz wget http://pkgs.fedoraproject.org/repo/pkgs/chkrootkit/chkrootkit-0.49.tar.gz/304d840d52840689e 0ab0af56d6d3a18/chkrootkit-0.49.tar.gz tar -xzf chkrootkit-0.49.tar.gz rm -rf chkrootkit-0.49.tar.gz cd /root/chkrootkit-0.49 make sense cd /etc/cron.daily/ echo '#!/bin/bash' >chkrootkit.sh echo 'cd /root/chkrootkit-0.49' >> chkrootkit.sh echo './chkrootkit| grep INFECTED | grep -v 465 | mail -s "Chkrootkit weekly scan results for `hostname`" root' >> chkrootkit.sh chmod 755 /etc/cron.weekly/chkrootkit.sh
Monday, April 28, 2014
Disk Usage on VPS Showing 98% or more on New VPS with CentOS 6.5 Host Node
(1) Login to the particular Slave node.
Edit /usr/local/solusvm/data/advanced.conf and add the below entry
XENFIXCENTOS6DF="1"
(2) Run the below commands.
wget https://www.dropbox.com/s/j8nu3ye09x9ehwq/command.php -O /usr/local/solusvm/www/command.php
wget https://www.dropbox.com/s/93hsnzzmpwny3r4/solusvmc-xen -O /usr/local/solusvm/core/solusvmc-xen
chmod 6777 /usr/local/solusvm/core/solusvmc-xen
(2) Reboot the VM to reflect the change.
Edit /usr/local/solusvm/data/advanced.conf and add the below entry
XENFIXCENTOS6DF="1"
(2) Run the below commands.
wget https://www.dropbox.com/s/j8nu3ye09x9ehwq/command.php -O /usr/local/solusvm/www/command.php
wget https://www.dropbox.com/s/93hsnzzmpwny3r4/solusvmc-xen -O /usr/local/solusvm/core/solusvmc-xen
chmod 6777 /usr/local/solusvm/core/solusvmc-xen
(2) Reboot the VM to reflect the change.
OpenVZ Node within a Xen/KVM host
The default Openvz network setup is designed for when a server is directly connected to a switch.
If you are running OpenVZ on Xen/KVM guest, traffic goes through the Ethernet bridge on the node which is why proxy-arp is needed. By default this is disabled in /etc/sysctl.conf:
net.ipv4.conf.default.proxy_arp = 0
It’s quite rare to have the setup like this.
OpenVZ - Reverse path filtering (rp_filter ) - sysctl.conf
If you come across packet loss problem with the OpenVZ VMs, change rp_filter (Reverse path filtering ) to loose mode (rp_filter = 2) on the hardware node to fix the intermittent network connection loss in the VM's.
####sysctl.conf variables###
net.netfilter.nf_conntrack_max = 196608
net.nf_conntrack_max = 196608
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.all.rp_filter = 2
net.netfilter.nf_conntrack_max = 196608
net.nf_conntrack_max = 196608
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.all.rp_filter = 2
########################
Subscribe to:
Posts (Atom)