Apache 2.4不寻常的日志

自从有些日子以来,我得到了一些黑客攻击的尝试,但实际上一切似乎都很好。

但我看到一些我无法解释的日志

127.0.0.1:443 216.218.206.66 - - [09/Oct/2015:04:49:29 +0200] "GET / HTTP/1.1" 404 4857 "-" "-" 127.0.0.1:80 220.181.108.177 - - [09/Oct/2015:07:56:11 +0200] "-" 408 0 "-" "-" 127.0.0.1:443 199.115.117.88 - - [09/Oct/2015:10:35:04 +0200] "GET /admin/i18n/readme.txt HTTP/1.1" 404 5081 "-" "python-requests/2.8.0" 

这里是我的日志configuration:

 # - Exeption SetEnvIf Request_URI "\.jpg$|\.jpeg$|\.gif$|\.png$|\.ico|\.icon|\.css$|\.js$|piwik\.php$|frogglogin\.php" dontlog SetEnvIf User-agent "(bot|baidu)" dontlog CustomLog ${APACHE_LOG_DIR}/access.log vhost_combined env=!dontlog 
  • 如何才能请求达到127.0.0.1?
  • 我能做些什么来防止408错误?
  • 我应该恐慌,看到thoosetypes的攻击包含?

谢谢

PS:

这是一个好主意吗 ?

 <VirtualHost 127.0.0.1> # [ Default restriction ] <Directory /> Order deny,allow Deny from all allow from 127.0.0.1 </Directory> </VirtualHost> 

公共IP地址无法直接到达您的环回地址。 这是NAT的问题,可能apache会将这些IP地址转换为回送,因为要么是告诉apache来做这个,要么是一些错误的configuration。

这样的事情没有恐慌,被僵尸networking和/或自动化应用程序devise的攻击是正常的尝试login页面等。

当这个尝试正在进行中,我宁愿检查:

  netstat -an (or adding additional parameters) 

检查连接。

这是我如何得到这个:

我在所有定义好的虚拟主机之后添加了这个configuration,以捕获“其他”请求(与其他虚拟主机不匹配的请求)。 最重要的是虚拟位置(最后)和命令ServerAlias *

 #---------------# # [ LOCALHOST ] # #---------------# # Local host for other: # ServerName localhost # ServerName 88.xxx.xxx.xxx # ServerName xxxxxxxx.net # and more ... # need to be at the last position <VirtualHost *:80 *:443> # [ Server Domain ] ServerName localhost ServerAlias * # [ Server Root ] DocumentRoot /var/www/home/ # [ Cancel trafic ] RewriteCond %{REQUEST_URI} !errors\/hack\.htm RewriteRule .*? - [END,R=406] # [ Custom Log ] CustomLog ${APACHE_LOG_DIR}/hack.log combined </VirtualHost>