我正在尝试使用 iptables 阻止对具有特定参数的 SSL GET 资源的任何请求,即:https://domain.com/hello?param=aux
我已经使用以下命令阻止了到端口 80 的流量(我们假设 iptables 规则列表为空):
iptables -I INPUT -p tcp --dport 80 -m string --string "GET /hello?param=aux" --to 70 --algo bm -j DROP
认为 SSL 版本是非常简单的(至少对于像我这样的非专家而言):
iptables -I INPUT -p tcp --dport 443 -m string --string "GET /hello?param=aux" --to 70 --algo bm -j DROP
但是它不起作用。对我做错了什么有什么想法吗? 提前致谢。
最佳答案
它永远不会起作用,因为所有到 SSL 站点的流量都是加密的,包括请求方法和参数。
关于ssl - Iptables 丢弃 SSL 流量 (443),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16216299/