yum -y install ipset

 wget -P . http://www.ipdeny.com/ipblocks/data/countries/cn.zone
 ipset -N cnip hash:net
 for i in $(cat /root/cn.zone ); do ipset -A cnip $i; done
 iptables -I INPUT -p tcp -m set --match-set cnip src --dport 22 -j DROP

 

相关文章:

  • 2022-12-23
  • 2021-11-06
  • 2021-11-05
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
  • 2022-01-01
猜你喜欢
  • 2021-08-16
  • 2021-09-19
  • 2021-10-20
  • 2022-12-23
  • 2022-01-01
  • 2021-08-31
相关资源
相似解决方案