How To Block All Traffic From China Using iptables and ipset on Amazon Linux

Author: , October 24th, 2019

All credit to Matt Wilcox for this excellent article, for which this post is based – thank you, Matt! https://mattwilcox.net/web-development/unexpected-ddos-blocking-china-with-ipset-and-iptables/ All commands run as root!

Do this once only:

Then add blockchina to the root cron

How To Block an Entire TLD in Postfix

Author: , September 13th, 2016

Step 1. Execute the following two commands: postconf -e smtpd_sender_restrictions=pcre:/etc/postfix/rejected_domains postconf -e reject_unauth_destinations=pcre:/etc/postfix/rejected_domains If that doesn’t work, you may hand-edit main.cf and add/edit these lines:

Step 2. Create the regex filter file: vim /etc/postfix/rejected_domains

Step 3. Signal Postfix to reread the config: postfix reload NOTE: Do NOT use the postmap command for the […]

Amazon Linux Upgrade Woes

Author: , April 10th, 2012

Upgraded the OS on one of my Amazon server instances today. After rebooting I had the unpleasant experience of seeing my rpc.rstatd monitoring daemon stop functioning. It turns out that AWS changed the actual kernel version for this release, I guess to “celebrate” the fact that it is no longer “beta”. The difficulty is that […]

How To Determine Which Linux Version / Build / Distribution Is Running

Author: , April 10th, 2012

uname -a -OR- cat /proc/version

How To List All Installed Packages Using yum

Author: , April 10th, 2012

yum list installed -OR- rpm -qa

How To Install s3fs On Amazon Linux Using yum

Author: , April 2nd, 2012

To be performed as the root user:

http://code.google.com/p/s3fs/wiki/FuseOverAmazon The s3fs password file has this format (use this format if you have only one set of credentials): accessKeyId:secretAccessKey If have more than one set of credentials, then you can have default credentials as specified above, but this syntax will be recognized as well: bucketName:accessKeyId:secretAccessKey

How To Install CurlFTPFS On Amazon Linux/CentOS

Author: , February 25th, 2012

http://curlftpfs.sourceforge.net/

How To Install ec2-consistent-snapshot On AWS/CentOS

Author: , December 30th, 2011

http://alestic.com/2009/09/ec2-consistent-snapshot http://www.thatsgeeky.com/2011/05/ec2-consistent-snapshot-on-amazons-linux-ami/ http://www.thatsgeeky.com/2011/06/rotating-ebs-snapshots-ec2-prune-snapshots/