<?
//禁止某个IP
$banned_ip = array (
"127.0.0.1",
//"119.6.20.66",
"192.168.1.4"
);
if ( in_array( getenv("REMOTE_ADDR"), $banned_ip ) )
{
die ("您的IP禁止访问!");
}
//禁止某个IP段
$ban_range_low=ip2long("119.6.20.65");
$ban_range_up=ip2long("119.6.20.67");
$ip=ip2long($_SERVER["REMOTE_ADDR"]);
if ($ip>$ban_range_low && $ip<$ban_range_up)
{
echo "您的IP在被禁止的IP段之中,禁止访问!";
exit();
}
?>
NameVirtualHost 221.*.*.* <VirtualHost 221.*.*.*> ServerName 221.*.*.* <Location /> Order Allow,Deny Deny from all </Location> </VirtualHost> <VirtualHost 221.*.*.*> DocumentRoot "c:/web" ServerName www.1sucai.cn </VirtualHost>
#屏蔽单个IP的命令是 iptables -I INPUT -s 123.45.6.7 -j DROP #封整个段即从123.0.0.1到123.255.255.254的命令 iptables -I INPUT -s 123.0.0.0/8 -j DROP #封IP段即从123.45.0.1到123.45.255.254的命令 iptables -I INPUT -s 124.45.0.0/16 -j DROP #封IP段即从123.45.6.1到123.45.6.254的命令是 iptables -I INPUT -s 123.45.6.0/24 -j DROP service iptables save
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有