Categories
Uncategorized

Block xmlrpc.php in .htaccess for WordPress

Open .htaccess file and paste below code at the end, replace IP with your server IP

# Block WordPress xmlrpc.php requests from other IPs
<Files xmlrpc.php>
order deny,allow
deny from all
allow from 104.25.x.x
</Files>

Categories
Uncategorized

Block an email in Postfix

1) Add a line to your main.cf
Code:
header_checks = regexp:/etc/postfix/header_checks
2) Create a new file, /etc/postfix/header_checks
Code:
/[email protected]\.com/ DISCARD
3) Restart service
/etc/init.d/postfix restart

Categories
Uncategorized

Windows Server check license activation

oobe/msoobe /a
Categories
Uncategorized

Find DDOS/DOS Attach IPs Most of the Hits on Linux server with netstat command

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

Categories
Bash Scripts

Find Core.* files in Magento / WordPress / Other CMS in Linux

Find them
find / -name 'core.*[[:digit:]]' -exec du -sch {} \;
Delete them
find / -name 'core.*[[:digit:]]' | xargs rm -f
Cron
0 * * * * find / -name 'core.*[[:digit:]]' | xargs rm -f

Issue:-

Huge size of core.xxxx files

Categories
Uncategorized

How to Install lz4 on Ubuntu

echo "deb http://us.archive.ubuntu.com/ubuntu vivid main universe" >> /etc/apt/sources.list
apt-get update
apt-get install liblz4-tool -y
Categories
Uncategorized

Create a big large file / Dummy file worth 10GB

fallocate -l 10G testfile.txt


OR

fallocate -l 10G testfile.log
Categories
Uncategorized

Check which process taking most of the RAM – Linux

ps -e -o pid,vsz,comm= | sort -n -k 2
Categories
Uncategorized

Update cPanel License Key

/usr/local/cpanel/cpkeyclt
Categories
Uncategorized

Wannacry – Windows Patches – Check these KBs are installed or not

Windows Vista & 2003 – KB4012598
Windows Windows 7 – KB4012212 | KB4012215 | KB4015549 | KB4019264
Windows Windows 8.1 – KB4012216 | KB4015550 | KB4019215
Windows 10 – KB4013198 | KB4015219 | KB4012606 | KB4019474 | KB4019473 | KB4013429 | KB4019472
Windows Server 2008 – KB4012598 | KB4018466
Windows Server 2008 R2 – KB4012212 | KB4012215 | KB4015549 | KB4019264
Windows Server 2012 – KB4012214 | KB4012217 | KB4015551 | KB4019216
Windows Server 2012 R2 – KB4012213 | KB4012216 | KB4015550 | KB4019215
Windows Server 2016 – KB4013429 | KB4019472 | KB4015217 | KB4015438 | KB4016635
Other Systems – KB4014511 | KB4019112 | KB4014504