iptables -P INPUT DROP or iptables -P INPUT ACCEPT
Monthly Archives: August 2014
mbuffer
mbuffer is a tool for buffering data streams with a large set of unique features:
direct support for TCP based network targets (IPv4 and IPv6)
ability to send to multiple targets in parallel (distribution mode)
support for multiple volumes
I/O rate limitation
high/low watermark based restart criteria
configurable buffer size
on the fly MD5 hash calculation
highly efficient, multi-threaded implementation
top 5 process page faults statistics
pidstat -T CHILD -r 2 5
convert xz to gz fast way
xzcat arch-20140707-x86_64.tar.xz | gzip > arch-20140707-x86_64.tar.gz
linux: find 10 largest folder by files count
find / -type f |awk '{$NF="";a[$0]++}END{for (i in a) print a[i],i }' FS=\/ OFS=\/ |sort -rn|head -10
mdadm raid metadata versions
Sub-Version Superblock Position on Device
0.9 At the end of the device
1.0 At the end of the device
1.1 At the beginning of the device
1.2 4K from the beginning of the device
phpmyadmin error token mismatch cpanel
If you are using Cloudlinux cPanel and have some problems with phpmyadmin: error token mismatch
You need check users tmp folder permissions. like this:
ls -lad /home/username/tmp
It should be chmod 755 /home/username/tmp
check ssl crt
openssl x509 -in certificate.crt -text -noout
exim remove all mail spool queue
cd /var/spool
mv exim exim.old
mkdir -p exim/input
mkdir -p exim/msglog
mkdir -p exim/db
chown -R mail:mail exim
/sbin/service exim restart
postfix remove email queue by sender
mailq|awk ‘ /^[0-9A-F][0-9A-F]*.*[email protected]$/ {print $1}’|tr -d ‘*’| xargs -rn1 postsuper -d
limit ssh connection attempts
iptables -I INPUT -p tcp –dport 22 -m state –state NEW -m recent –set
iptables -I INPUT -p tcp –dport 22 -m state –state NEW -m recent –update –seconds 60 –hitcount 3 -j DROP
limit incoming connections to destination port 22 not more than 3 in a minute
mysqldump: too many connections
Make sure you have enough disk space your server.
df -h
linux kill attached screen
screen -X -S SCREENID kill
debian fix phpmyadmin
dpkg-reconfigure phpmyadmin
shell-init: error retrieving current directory: getcwd: cannot access parent directories:
Fix.
cd && run_some_command_again