当前位置:网站首页>apache、iis6、ii7独立ip主机屏蔽限制ip访问
apache、iis6、ii7独立ip主机屏蔽限制ip访问
2022-06-28 01:21:00 【wwwwestcn】
注:
如果只屏蔽IP 8.8.4.4 则写(8.8.4.4)
如果只屏蔽IP段8.8.8. 则写(8.8.8.)
屏蔽多段中间用|隔开,如(8.8.4.4|8.8.8.)
Linux下 规则文件.htaccess(手工创建.htaccess文件到站点根目录)
<IfModule mod_rewrite.c>
RewriteEngine On
#Block ip
RewriteCond %{http:X-Forwarded-For}&%{REMOTE_ADDR}&%{http:X-Real-IP} (8.8.4.4|8.8.8.) [NC]
RewriteRule (.*) - [F]
</IfModule>
windows2003下 规则文件httpd.conf
若是安装了我司助手环境请先按iis6、iis7、apache、nginx伪静态及设置301重定向(适用vps云主机服务器) -西部数码帮助中心 把伪静态组件开启,然后添加以下规则。
若是纯净版系统,请按iis6手动配置单个站点伪静态(适用vps云主机服务器) -西部数码帮助中心 把伪静态组件开启,然后在配置文件中按以下系统规则配置
#Block ip
RewriteCond %{HTTP_X_FORWARDED_FOR}&%{REMOTE_ADDR}&%{HTTP_X_Real_IP} (8.8.4.4|8.8.8.) [NC]
RewriteRule (.*) - [F]
windows2008下 规则文件web.config (手工创建web.config文件到站点根目录)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="band ip" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="%{HTTP_X_FORWARDED_FOR}&%{REMOTE_ADDR}&%{HTTP_X_Real_IP}" pattern="(8.8.4.4|8.8.8.)" />
</conditions>
<action type="AbortRequest" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
边栏推荐
- Character interception triplets of data warehouse: substrb, substr, substring
- [today in history] May 29: the pioneer of sharing software was born; Chromebox launched; VoodooPC founder was born
- Exploration on the construction path of real-time digital warehouse integrating digital intelligence learning and streaming batch
- 【模糊神经网络】基于matlab的模糊神经网络仿真
- How fiddle uses agents
- [today in history] June 18: JD was born; The online store platform Etsy was established; Facebook releases Libra white paper
- [today in history] June 6: World IPv6 launch anniversary; Tetris release; Little red book established
- > Could not create task ‘:app:MyTest. main()‘. > SourceSet with name ‘main‘ not found. Problem repair
- Review the submission of small papers for 2022 spring semester courses
- 喜新厌旧?IT公司为什么宁愿花20k招人,也不愿涨薪留住老员工
猜你喜欢
isEmpty 和 isBlank 的用法區別
Moving Tencent to the cloud: half of the evolution history of cloud server CVM
Reprinted article: the digital economy generates strong demand for computing power Intel releases a number of innovative technologies to tap the potential of computing power
Packet capturing and sorting out external Fiddler -- understanding the toolbar [1]
[today in history] June 6: World IPv6 launch anniversary; Tetris release; Little red book established
Review the submission of small papers for 2022 spring semester courses
分布式事务解决方案Seata-Golang浅析
[today in history] June 16: Oracle Bone Inscriptions was established; Microsoft MSX was born; The inventor of fast Fourier transform was born
[today in history] June 10: Apple II came out; Microsoft acquires gecad; The scientific and technological pioneer who invented the word "software engineering" was born
Win11无法使用动态壁纸怎么办?Win11用不了动态壁纸的解决方法
随机推荐
Review the submission of small papers for 2022 spring semester courses
为什么大厂压力大,竞争大,还有这么多人热衷于大厂呢?
被通知裁员后拿到5个offer
JDBC与MySQL数据库
PHP 代码 微信、公众号、企业微信 发送表情符号 [U+1F449]
Stm32f1 and stm32subeide programming example - metal touch sensor driver
Writing based on stm32
A low-cost method to increase private domain traffic with simple maintenance
[today in history] June 23: Turing's birthday; The birth of the founder of the Internet; Reddit goes online
英特尔锐炫A380显卡即将在中国面市
无心剑英汉双语诗004.《静心》
拾光者,云南白药!
初始线性回归
[today in history] May 31: the father of Amiga was born; The co developer of basic language was born; BlackBerry BBM shutdown
[inverted pendulum control] Simulink simulation of inverted pendulum control based on UKF unscented Kalman filter
What if win11 can't drag an image to the taskbar software to open it quickly
MFC common current path
[today in history] June 13: parent-child disputes in packet switched networks; The founder of game theory was born; The embryonic form of interactive television
"Everyday Mathematics" serial 53: February 21
Arduino esp8266 web LED control