一旦服务器被添加到垃圾邮件发送者“开放代理”列表中如何禁用代理请求?

我刚从一家新公司开始,一直在设置他们的Apache web服务器conf文件,只是为了发现他们的Apache服务器已经成为全球开放的代理服务器两个月。 我已经在httpd.conf文件中设置了ProxyRequests Off,并重新启动了Web服务器,但是访问日志文件仍在以惊人的速度增长(每天大约一个演出)。 我注意到另外一个问题在这里发布( Apache命中代理请求 ),但他们的访问日志应该是返回404错误,而我的似乎是返回403和404代码…这是正确的吗?

以下是我的访问日志中的几行:

87.118.118.124 - - [16/Mar/2010:10:56:36 -0400] "GET http://www.c5interlude.ru/torrent/viewtopic.php?p=2501 HTTP/1.0" 404 219 "http://www.c5interlude.ru/torrent/viewtopic.php?p=2501" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)" 117.41.184.27 - - [16/Mar/2010:10:56:36 -0400] "GET http://ad.xtendmedia.com/st?ad_type=iframe&ad_size=300x250&section=790074 HTTP/1.0" 404 200 "http://www.newbiegamer.com" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Alexa Toolbar)" 122.224.55.222 - - [16/Mar/2010:10:56:36 -0400] "GET http://www.188woool.net/\xb4\xf3\xd4\xcb\xb4\xab\xca\xc0.rar HTTP/1.1" 403 214 "http://www.188woool.net/\xb4\xf3\xd4\xcb\xb4\xab\xca\xc0.rar" "Mozilla/4.0" 58.55.21.40 - - [16/Mar/2010:10:56:36 -0400] "GET http://www.cpx24.com/ad1.js HTTP/1.0" 404 204 "http://thebighits.com/?id=aibux" "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" 122.226.223.188 - - [16/Mar/2010:10:56:36 -0400] "GET http://ad.reduxmedia.com/st?ad_type=iframe&ad_size=160x600&section=798636 HTTP/1.0" 404 200 "http://www.gvvu.com" "Mozilla/4.0 (compatible; MSIE 5.5; AOL 6.0; Windows 98; Win 9x 4.90)" 84.51.109.31 - - [16/Mar/2010:10:56:36 -0400] "GET http://www.kslp.ru/forum/index.php HTTP/1.0" 404 213 "http://www.kslp.ru/forum/index.php" "Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0 ; .NET CLR 2.0.50215; SL Commerce Client v1.0; Tablet PC 2.0" 122.224.48.49 - - [16/Mar/2010:10:56:36 -0400] "GET http://www1.vip218.com/\xb2\xca\xba\xe7\xb4\xab\xca\xc0.exe HTTP/1.1" 403 214 "http://www1.vip218.com/\xb2\xca\xba\xe7\xb4\xab\xca\xc0.exe" "Mozilla/4.0" 117.41.184.27 - - [16/Mar/2010:10:56:36 -0400] "GET http://ad.xtendmedia.com/st?ad_type=iframe&ad_size=728x90&section=657624 HTTP/1.0" 404 200 "http://www.raiseanimals.com" "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Alexa Toolbar)" 

和我相应的错误日志条目:

 [Tue Mar 16 10:56:36 2010] [error] [client 87.118.118.124] File does not exist: C:/public_html/torrent, referer: http://www.c5interlude.ru/torrent/viewtopic.php?p=2501 [Tue Mar 16 10:56:36 2010] [error] [client 117.41.184.27] File does not exist: C:/public_html/st, referer: http://www.newbiegamer.com [Tue Mar 16 10:56:36 2010] [error] [client 122.224.55.222] (22)Invalid argument: Cannot map GET http://www.188woool.net/\xb4\xf3\xd4\xcb\xb4\xab\xca\xc0.rar HTTP/1.1 to file, referer: http://www.188woool.net/\xb4\xf3\xd4\xcb\xb4\xab\xca\xc0.rar [Tue Mar 16 10:56:36 2010] [error] [client 58.55.21.40] File does not exist: C:/public_html/ad1.js, referer: http://thebighits.com/?id=aibux [Tue Mar 16 10:56:36 2010] [error] [client 122.226.223.188] File does not exist: C:/public_html/st, referer: http://www.gvvu.com [Tue Mar 16 10:56:36 2010] [error] [client 84.51.109.31] File does not exist: C:/public_html/forum, referer: http://www.kslp.ru/forum/index.php [Tue Mar 16 10:56:36 2010] [error] [client 122.224.48.49] (22)Invalid argument: Cannot map GET http://www1.vip218.com/\xb2\xca\xba\xe7\xb4\xab\xca\xc0.exe HTTP/1.1 to file, referer: http://www1.vip218.com/\xb2\xca\xba\xe7\xb4\xab\xca\xc0.exe [Tue Mar 16 10:56:36 2010] [error] [client 117.41.184.27] File does not exist: C:/public_html/st, referer: http://www.raiseanimals.com 

这实际上是否看起来像服务器阻止他们正确,还有什么我可以做得更好,以减less我的访问日志大小? (也许完全阻止来自服务器的这些请求?)

谢谢! 马特

更新:

这些是成功的代理…但我没有启用ProxyRequests! (它甚至没有出现在我的httpd.conf文件中(默认为否),但是之后在我的httpd.conf文件中添加了ProxyRequests Off作为第四行)。

 95.211.14.24 - - [03/Jun/2010:12:01:24 -0400] "CONNECT mail.yahoo.com:443" 200 6103 "-" "-" 98.126.74.66 - - [03/Jun/2010:12:01:39 -0400] "CONNECT intlreg.aol.com:443 HTTP/1.1" 200 6103 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) )" 98.126.74.66 - - [03/Jun/2010:12:01:40 -0400] "\x16\x03\x01" 200 6103 "-" "-" 91.5.169.251 - - [03/Jun/2010:12:01:43 -0400] "GET http://shop.breho-tools.de/index.php?cat=c95_Doppelhobel.html HTTP/1.0" 200 6103 "-" "-" 114.25.230.147 - - [03/Jun/2010:12:01:50 -0400] "CONNECT mail2000.com.tw:25 HTTP/1.0" 200 6103 "-" "-" 67.208.112.37 - - [03/Jun/2010:12:02:02 -0400] "GET http://yahoo.com:80/ HTTP/1.1" 200 6103 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB7.0 (.NET CLR 3.5.30729)" 67.208.112.37 - - [03/Jun/2010:12:02:18 -0400] "GET http://yahoo.com:80/ HTTP/1.1" 200 6103 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB7.0 (.NET CLR 3.5.30729)" 69.132.95.188 - - [03/Jun/2010:12:02:33 -0400] "GET http://login.vip.kr3.yahoo.com/config/isp_verify_user?l=_sunflowerwoman&p=%20%20%20%20%20 HTTP/1.0" 404 220 "-" "-" 120.37.91.109 - - [03/Jun/2010:12:02:37 -0400] "GET http://543b5be9.linkbucks.com/ HTTP/1.1" 200 6103 "http://dns.ladymx.com:1108/shangcheng/" "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 3.0.30729)" 120.37.91.109 - - [03/Jun/2010:12:02:37 -0400] "GET http://543b5be9.linkbucks.com/RecordClick.aspx?id=&key=&ref=&cacheBust=80493192 HTTP/1.1" 404 214 "http://dns.ladymx.com:1108/shangcheng/" "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 3.0.30729)" 120.37.91.109 - - [03/Jun/2010:12:02:40 -0400] "GET http://543b5be9.linkbucks.com/RecordClick.aspx?id=&key=&ref=&cacheBust=80493192 HTTP/1.1" 404 214 "http://dns.ladymx.com:1108/shangcheng/" "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 3.0.30729)" 66.77.255.230 - - [03/Jun/2010:12:02:40 -0400] "GET http://proxyjudge1.proxyfire.net/fastenv HTTP/1.1" 404 205 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" 120.37.91.109 - - [03/Jun/2010:12:02:42 -0400] "GET http://543b5be9.linkbucks.com/RecordClick.aspx?id=&key=&ref=&cacheBust=80493192 HTTP/1.1" 404 214 "http://dns.ladymx.com:1108/shangcheng/" "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 3.0.30729)" 89.149.223.112 - - [03/Jun/2010:12:02:43 -0400] "CONNECT mail.yahoo.com:443" 200 6103 "-" "-" 95.211.0.132 - - [03/Jun/2010:12:02:49 -0400] "CONNECT mail.yahoo.com:443" 200 6103 "-" "-" 217.133.52.34 - - [03/Jun/2010:12:02:52 -0400] "GET http://www.naturalintegrator.com/buoni-regalo-c-21.html HTTP/1.1" 404 220 "http://www.mylevis.us/" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" 

你回来了404和403(都拒绝各种types),所以我不会担心。 我猜测你有一个过于乐观的虚拟主机,正在捕捉所有的stream量,并试图用它做一些事情。

只要开始担心,如果你没有能够解释它的任何返回2xx 🙂

您还可以阻止所有除了内部子网的代理请求,这是由http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxy和http://httpd.apache.org/推荐的docs / 2.2 / mod / mod_proxy.html#access 。

 You can control who can access your proxy via the <Proxy> control block as in the following example: <Proxy *> Order Deny,Allow Deny from all Allow from 192.168.0 </Proxy> For more information on access control directives, see mod_authz_host. Strictly limiting access is essential if you are using a forward proxy (using the ProxyRequests directive). Otherwise, your server can be used by any client to access arbitrary hosts while hiding his or her true identity. This is dangerous both for your network and for the Internet at large. When using a reverse proxy (using the ProxyPass directive with ProxyRequests Off), access control is less critical because clients can only contact the hosts that you have specifically configured. 

我相信这会导致对客户端的“403 Forbidden”响应,这是不太安全的,然后是“404 Not Found”,因为“403 Forbidden”提供了一些暗示仍然存在,但是被禁止。

您应该只从几个IP地址获取代理请求。 防火墙这些地址。 至less防止访问HTTP,但我会完全防火墙。

如果代理是一个模块禁用模块。 在Linux上,您可以使用a2dismod来禁用模块。