waf
iptables实现waf
iptables拦截ip
# 拦截ip
iptables -A INPUT -p tcp --dport 80 -s 192.168.199.1 -j DROP
# 删除拦截
iptables -D INPUT -p tcp --dport 80 -s 192.168.199.1 -j DROP利用ipset进行批量IP拦截
# 创建ip集
ipset create bloodzer0 hash:ip
# 查看ip集
ipset list
# 添加成员
ipset add bloodzer0 ip
# 删除成员
ipset del bloodzer0 ip
# 将ipset保存为文件
ipset save bloodzer0 -f bloodzer0.txt
# iptables与ipset结合
iptables -A INPUT -m set --match-set bloodzer0 src -p tcp --dport 80 -j DROP 问题思考
根据XFF+iptables封禁IP
踩坑记
XFF+iptables实现waf性能瓶颈
参考资料
最后更新于
这有帮助吗?