Skip to content

JMousqueton/linux-firewall-block-country

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Quick & Dirty script to block China netblocks with iptables 🔥 🇨🇳

Usage

  1. Copy iptables.firewall.rules to /etc

these rules only allow 80/TCP, 443/TCP and 22/TCP

  1. Execute block-china.sh
  2. Add to crontab :

crontab -e

0 5 * * * /etc/block-china.sh > /dev/null 2>&1

you can check with the commande iptables -L