ngrep -qp 'GET|POST' port 80
ngrep -W byline port 80
ngrep -d any port 25
ngrep -wi -d any 'user|pass' port 21
ngrep -O /tmp/dns.dump -d any -T port domain
ngrep -tD ns3 -I /tmp/dns.dump
ngrep -qp 'GET|POST' port 80
ngrep -W byline port 80
ngrep -d any port 25
ngrep -wi -d any 'user|pass' port 21
ngrep -O /tmp/dns.dump -d any -T port domain
ngrep -tD ns3 -I /tmp/dns.dump
echo your_hostname > /etc/hostname
hostname your_hostname
service httpd restart
cat access.* | awk '{ print $1 } ' | sort | uniq -c | sed -r 's/^[ \t]*([0-9]+) (.*)$/\1 --- \2/' | sort -rn
Zabbix disk i/o template:
zbx_linux_disk_io_template.xml.tar
Auto discovery script for zabbix agents written in perl:
#!/usr/bin/perl
use strict;
use warnings;
# Options
my $_proc = “/proc/diskstats”;
# Validate options
if ( ! -e $_proc)
{
die “File $_proc not found!”;
}
# Keep count
my $_first = 1;
# Present the data in JSON format
print “{\n”;
print “\t\”data\”:[\n\n”;
# Fetch the data and put it in an array
my @_data = `cat $_proc | awk ‘{ print \$3 }’`;
chomp @_data;
# Read the array and print the wanted data
foreach my $_disk (@_data)
{
# Print the data in JSON
print “\t,\n” if not $_first;
$_first = 0;
print “\t{\n”;
print “\t\t\”{#DISK}\”:\”$_disk\”\n”;
print “\n\t}\n”;
}
print “\n\t]\n”;
print “}\n”;
Zabbix userparameter_linux_disks.conf:
# See https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats
#
# reads completed successfully
UserParameter=custom.vfs.dev.read.ops[*],cat /proc/diskstats | egrep $1 | head -1 | awk ‘{print $$4}’
# sectors read
UserParameter=custom.vfs.dev.read.sectors[*],cat /proc/diskstats | egrep $1 | head -1 | awk ‘{print $$6}’
# time spent reading (ms)
UserParameter=custom.vfs.dev.read.ms[*],cat /proc/diskstats | egrep $1 | head -1 | awk ‘{print $$7}’
# writes completed
UserParameter=custom.vfs.dev.write.ops[*],cat /proc/diskstats | egrep $1 | head -1 | awk ‘{print $$8}’
# sectors written
UserParameter=custom.vfs.dev.write.sectors[*],cat /proc/diskstats | egrep $1 | head -1 | awk ‘{print $$10}’
# time spent writing (ms)
UserParameter=custom.vfs.dev.write.ms[*],cat /proc/diskstats | egrep $1 | head -1 | awk ‘{print $$11}’
# I/Os currently in progress
UserParameter=custom.vfs.dev.io.active[*],cat /proc/diskstats | egrep $1 | head -1 | awk ‘{print $$12}’
# time spent doing I/Os (ms)
UserParameter=custom.vfs.dev.io.ms[*],cat /proc/diskstats | egrep $1 | head -1 | awk ‘{print $$13}’
Full article there:
http://www.denniskanbier.nl/blog/monitoring/monitoring-disk-io-using-zabbix/
rpm –import http://packages.atrpms.net/RPM-GPG-KEY.atrpms
vi /etc/yum.repos.d/atrpms.repo
[atrpms]
name=Fedora Core $releasever – $basearch – ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
enabled=0
[atrpms-testing]
name=Fedora Core $releasever – $basearch – ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/testing
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1
enabled=0`
yum --enablerepo=atrpms* install ffmpeg
If you are afraid of POODLE Attack, you should disable SSL v3. You can use this ansible playbook:
—
– hosts: test
remote_user: root
tasks:
– lineinfile: dest=/usr/local/apache/conf/includes/pre_main_global.conf line=”#Turn off SSL v3 support\nSSLProtocol All -SSLv2 -SSLv3\nSSLHonorCipherOrder On\n” insertafter=BOF
– name: rebuild httpd confs
command: /scripts/rebuildhttpdconf
notify:
– restart httpd
– name: ensure apache is running
service: name=httpd state=started
handlers:
– name: restart httpd
service: name=httpd state=restarted
openssl s_client -connect linux4you.tk:443 -ssl3
Fix.
rpm -qa | grep -i frontpage
yum remove frontpage-*
/scripts/cpup
vi /var/cpanel/cpanel.config
alwaysredirecttossl=0
requiressl=0
service cpanel restart
http://nnattawat.github.io/flip/
yum install centos-release-SCL
yum install php54 php54-*
/opt/rh/php54/root/usr/bin/php
Fix:
touch /var/cpanel/rvglobalsoft/rvsitebuilder/var/skip_validate_domain
rm -rf /var/installatron/cache/i5_repair_inprogress
cat /var/cpanel/nameserverips.yaml
/usr/local/cpanel/scripts/nameserverup
cat /etc/nameserverips
sed -i -e ‘s/14400/300/g’ -e ‘s/86400/300/g’ -e “s/[0-9]\{10\}/`date +%Y%m%d%H`/g”
/etc/init.d/named restart