限制IP安全 [英] restricting IP security

查看:397
本文介绍了限制IP安全的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

存在限制IP安全性的问题。
我制作了一个web.config文件并将其放在我试图限制的文件夹中,如下所示:

Having an issue with restricting IP security. I have made a web.config file and placed it in the folder I am trying to restrict see below:

<?xml version="1.0" encoding="UTF-8"?>
  <configuration>
   <system.webServer>
    <security>
      <ipSecurity allowUnlisted="false" enableProxyMode="true" denyAction="Forbidden">            
        <clear />           
        <add ipAddress="123.456.789" allowed="true" />
    </ipSecurity>
   </security>
 </system.webServer>
</configuration>

我还将applicationHost.config调整为:

I have also adjusted the applicationHost.config to:

    <section name="ipSecurity" overrideModeDefault="Allow" />

然而,当浏览到该文件夹​​中的文件时,我得到403.
我已重新启动IIS和IP地址是正确的。

However when browsing to a file in that folder I get a 403. I have restarted IIS and IP address is correct.

我缺少什么?

推荐答案

检查IIS日志中的客户端IP(c-ip)并将其添加到ip - 限制规则。

Check the client IP (c-ip) in IIS logs and add that to ip - restrictions rules.

这篇关于限制IP安全的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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