【原创】端口扫描检测 PSD 参数详解
PSD (Port scan detecting) 端口扫描检测技术是保护RouterOS路由器安全的一项有效技术。 扫描开放的端口往往是黑客攻击的第一步,比如NMAP就是很好的端口扫描工具。在RouterOS加入以下规则
add chain=input protocol=tcp psd=21,3s,3,1 action=drop comment="detect and drop port scan connections" disabled=no 可以有效阻断外部ip对RouterOS路由器的扫描。
在winbox下的对应设置如下
Action中可以直接drop,或者先log,再drop, 还可以将对你进行的端口扫描的ip地址放入 address list,禁止这些ip对路由器的后续访问。
但是 Psd=21,3s,3,1 这四个参数的具体含义又是什么呢?
iptables的官方文档是这样描述的
第一个参数 21-> Portscan detection weight threshold(端口扫描检测权重阈值)
第二个参数 3s-> Portscan detection delay threshold (端口扫描检测延迟阈值)
第三个参数 3 -> Privileged ports weight (1-1024端口权重)
第四个参数 1 -> High ports weight (1024以上端口权重)
可能很多人看了还是一头雾水,那我们看下该模块作者对这几个参数的解释
Simply for for default config: imagine a sequence of packets with the
same source IP and differen destination IP/Port with an time interval
between two successive packets < 3 sec.(delay-threshold) arriving a psd
protected host. The packets with dest port <= 1024 are rated with 3
(lo-ports-weight), others with 1 (hi-ports-weight). The weights of
successive packets will be added and if limit of 21 (weight-threshold)
is reached, i.e. after 7 packets to low ports or 21 packets to high ones
or some mixed form of it, a port scan will be reported.
我来翻译一下,假设有一台机器对你的RouterOS路由器的不同端口持续发送一系列数据包,每两个数据包之间的时间间隔不超过3秒,这些包的目的端口如果是1024以下端口,
那么权重就记为3,如果目的端口是1024以上端口,则权重记为1,这些连续的包的权重将会被累加,如果累加的值超过21,将会启用以上的端口扫描检测防火墙规则,其后续的数据包将会被丢弃。
也就是说,对低端口连续发送7个至不同端口的数据包,或者对高端口发送21个,或者其混合权重达到21,都会触发该防火墙规则。
21,3s,3,1是默认参数,理解了以上参数的详细内容以后,可以根据自己的特定需求对其进行修改。
---------------------------------------------------------------------------------------------------------------------
RouterOSQQ高级交流群: 5278776:)
[ 本帖最后由 zhjchina 于 2008-11-12 02:16 编辑 ] 不错,顶下 支持,,希望多发点这方面的文章 支持 收藏了。 这类贴得多顶顶~ 自顶一下 谢谢!!!!!! 好文,记号下来,谢谢 很久没有的好文 好吧,我顶一下,刚试了一下,把我的winbox都给断了,我是从外网连的,没法了我得到机器上去操作了。 好文章,多谢分享 好文章,多谢分享 好文章,多谢分享 又学会了点东西
页:
[1]
2