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