创建对应的ip集合 ipset create black_list hash:ip timeout 0 添加对应的防火墙策略 iptables -A INPUT -p tcp -m set --match-set black_list src -m multiport --dports 443,80 -j DROP 添加ip到集合中 #3600 单位是s ipset add black_list 10.0.2.2 timeout 3600 删除集合中的ip ipset del black_list 10.0.2.2