简介
如何从Web应用程序/服务方框大量 IP地址
的。很明显,可以轻松地在 PHP来完成
或任何编程语言
How do you Block large number of IP address
from your web application/server. Obviously that can easily be done in PHP
or any programming language
$ipList = []; // array list or from database
if (in_array(getIP(), $ipList)) {
// Log IP & Access information
header("https://www.google.com.ng/search?q=fool"); // redirect
exit(); // exit
}
或者使用的htaccess
order allow,deny
deny from 123.45.6.7
deny from 012.34.5.
# .... the list continues
allow from all
的问题
我试图阻止整个 10万加单独的IP
不是子网
我试图避免让用户阻止此类IP之前,PHP
100000+超过1.5MB,这是很多,如果信息被加载在的htaccess
所有时间
IP数据库还在不断增加......而他们将是娘家动态添加更多的值
要设置的iptables
禁令为100000+仅仅是荒谬的(可能是错误的)
Am trying to block a whole 100k plus individual IPs
not subnets
Am trying to avoid user getting to PHP before blocking such IP
100000+ is over 1.5MB and that is a lot if information to be loading in htaccess
all the time
Database of IP still growing ... and they would be nee to dynamically add more values
To set bans in iptables
for 100000+ is just ridiculous (Might Be wrong)
愚蠢的想法
order allow,deny
deny from database <-------- Not sure if this is possible
allow from all
问题
是否有可能为的htaccess
来从数据库中获得的列表(Redis的,Crunchbase,蒙戈,MySQL或甚sqlite的)...任何
有没有明显的解决方案,在生产经营这类问题
在我所知道的最好的解决办法就是块中的IP地址在防火墙级别
有没有什么办法来务实地添加/删除IP防火墙
Is it possible for htaccess
to get the list from database (Redis,Crunchbase,Mongo, MySQL or even Sqlite) ... any
Is there a visible solution to manage such kind of issue in production
I know the best solution is Block the IPs at the firewall level
is there any way to pragmatically add/remove IP to the firewall
最后
我的方法可能是完全错误的......我要的是因为垃圾邮件发送者一个明显的解决方案和僵尸网络都在上升...
My approach might be totally wrong ... all I want is a visible solution since spammers and botnets are on the rise ...
请这有没有关系 DOS
攻击它的一个简单... 迷失响应
Please this has nothing to do with DOS
attack its a simple ... get lost response
更新
防火墙:的Cisco PIX 515UR您想在一个的