首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >iptables规则

iptables规则
EN

Server Fault用户
提问于 2021-09-02 03:10:11
回答 1查看 125关注 0票数 0
代码语言:javascript
复制
iptables -t raw -F
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Mozil" --algo kmp --to 65535 -m tcp --dport 1000   # You can change the port here
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Saf" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Edge" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Oper" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Chrom" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Gecko" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Andr" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "exch" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Fire" --algo kmp --to 65535 -m tcp --dport 1000
iptables -t raw -I PREROUTING -j DROP -p tcp -m string --string "Wind" --algo kmp --to 65535 -m tcp --dport 1000

如果我尝试访问http://127.0.0.1:1000/,它拒绝连接,但是如果我尝试https://127.0.0.1:1000,我可以访问,为什么?顺便问一下!

它是一个在第7层上使用DDoS攻击的应用服务器。我没有应用程序的src,所以没有阻止iptables的解决方案吗?如果我用相同的规则阻止端口443怎么办?

EN

回答 1

Server Fault用户

发布于 2021-09-02 04:05:32

因为HTTP是纯文本,HTTPS是加密的。

撇开这一点不说,我建议不要使用这种方法阻止特定的用户代理-它应该在web服务器本身内完成。

票数 3
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1076373

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档