阿帕奇访问该网站拦截的IP地址 [英] Apache block an ip address from accessing the website

查看:448
本文介绍了阿帕奇访问该网站拦截的IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人试图访问页面,如

// // mysqladmin脚本/ setup.php

//mysqladmin//scripts/setup.php

是它的一些黑客企图或..?

Is it some hack attempt or .. ?

如果是的话,我怎么能访问我的网站阻止其IP?

If yes then how i can block its ip from accessing mine website ?

通过htaccess的还是其他什么东西?

Via htaccess or something else ?

推荐答案

要阻止特殊的IP地址,你可以把位于目录.htaccess文件下,你想限制:

To block special IP addresses you can put the following in a .htaccess file located in your directory, you like to restrict:

order allow,deny
deny from 1.2.3.4
allow from all

其中1.2.3.4是你想阻止IP。

Where 1.2.3.4 is the IP you like to block.

但需要注意的IP不会忽略更改用户,也袭击者改变IP不会忽略。

But note that IP adresses change users and also attackers change IP adresses.

所以这不会保护应用程序,并可能阻止游人式法律

So this will not secure your application and potentially block leagal visitors.

更好的解决方案将是确保你的脚本不接受恶意的路径。

The better solution will be to make sure your script does not accept malicious paths.


  1. 附加一个基本路径,以从用户获取路径

  2. 确保路径从用户那里得到不包含'../'

这篇关于阿帕奇访问该网站拦截的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆