我的网站最近受到DOS攻击,似乎已经通过安装mod-evasive(这很好)
我想find用于攻击的IP,所以我很自然地去了access.log,只发现了数百行:
127.0.0.1 - - [08/Oct/2011:22:08:33 +0200] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.9 (Debian) PHP/5.3.8-1~dotdeb.1 with Suhosin-Patch (internal dummy connection)" 127.0.0.1 - - [08/Oct/2011:22:09:22 +0200] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.9 (Debian) PHP/5.3.8-1~dotdeb.1 with Suhosin-Patch (internal dummy connection)" 127.0.0.1 - - [08/Oct/2011:22:09:23 +0200] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.9 (Debian) PHP/5.3.8-1~dotdeb.1 with Suhosin-Patch (internal dummy connection)" 127.0.0.1 - - [08/Oct/2011:22:09:24 +0200] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.9 (Debian) PHP/5.3.8-1~dotdeb.1 with Suhosin-Patch (internal dummy connection)"
我敢肯定这是因为我使用mod_rewrite,简而言之,我希望apachelogging预redirect请求,而不是内部redirect请求 – 有谁知道这是可能的吗?
这些是apache父进程的内部请求,以保持subprocess的活动,并在加载需要新的subprocess时生成新的subprocess。
根据拒绝服务攻击的types,从访问日志中获取IP将不会有多less好运。 访问日志只logging请求 – 许多DoS攻击实际上不提交HTTP请求。 一些做。
你可能可以从RewriteLog中得到你想要的东西,但这通常不会包含在访问日志中。 访问日志表示一旦处理完成(无论是否成功),logging请求。 您可能从mod_log_forensic中获得了您要查找的数据,但是我不知道人们是否会build议使用此模块进行日常的请求logging。
我的网站最近受到DOS攻击
你是如何确定你的服务器受到攻击的?
(内部虚拟连接)
我很确定这是因为我使用mod_rewrite,
不,这些是Apache发回给自己的请求,以唤醒正在侦听新连接的进程。 看看这个,如果你想忽略它们。
我想find用于攻击的IP
您也可以使用netstat
来计算到端口80的连接,如下所示:
netstat -n | grep :80 | awk '{ print $5 }' | cut -d: -f1 | sort | uniq -c | sort -rn | head
这些连接与mod_rewrite没有任何关系,你不应该担心。
如果你想find攻击者,我build议再次研究你的访问日志。 一些日志分析器可能为您节省很多时间。 我使用ddosViewer查看器来检查日志,虽然networking中有很多这样的程序。 我知道这个网站是俄文的,但是它的使用非常简单,我不禁推荐你的问题。