18禁超污无遮挡无码网址极速丨亚洲精品久久国产片400部丨黑人巨茎美女高潮视频丨18禁裸乳啪啪无遮裆网站丨免费1级做爰片1000部视频

×

幫助中心

常見問題
資料下載
新手上路

WINDOWS系統云虛擬主機及馳云產品訪問IP限制方法

  • 作者:新網
  • 文章來源:新網
  • 點擊數:100
  • 更新時間:2017-05-04 09:10:28

   WINDOWS系統云虛擬主機及馳云產品訪問IP限制方法

 

  使用新網Windows系統云虛擬主機和馳云主機的客戶,如需要限制某些IP訪問,或只允許某些IP訪問,可以通過如下方式實現。

 

  1. 限制部分IP訪問:

 

  請自行創建并編寫web.config文件,上傳至網站根目錄下的/WWW/目錄中。

  內容如下:

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

    <system.webServer>

        <rewrite>

            <rules>

                <rule name="RequestBlockingRule1" patternSyntax="Wildcard" stopProcessing="true">

                    <match url="*" />

                    <conditions logicalGrouping="MatchAny">

                        <add input="{REMOTE_ADDR}" pattern="192.168.0.1" />

                        <add input="{REMOTE_ADDR}" pattern="192.168.1.*" />

                    </conditions>

                    <action type="CustomResponse" statusCode="403" statusReason="Forbidden: Access is denied." statusDescription="You do not have permission to view this directory or page using the credentials that you supplied." />

                </rule>

            </rules>

        </rewrite>

    </system.webServer>

</configuration>

  RequestBlockingRule1 限制了192.168.0.1單個IP訪問及192.168.1.* 整個C段訪問。

 

  2. 只允許部分IP訪問

 

  請自行創建并編寫web.config文件,上傳至網站根目錄下的/WWW/目錄中。

 

  內容如下:

<?xml version="1.0" encoding="UTF-8"?>

<configuration>

    <system.webServer>

        <rewrite>

            <rules>

                <rule name="RequestBlockingRule1" patternSyntax="Wildcard" stopProcessing="true">

                    <match url="*" />

                    <conditions>

                        <add input="{REMOTE_ADDR}" pattern="192.168.0.1" negate="true" />

                        <add input="{REMOTE_ADDR}" pattern="192.168.1.*" negate="true" />

                    </conditions>

                    <action type="CustomResponse" statusCode="403" statusReason="Forbidden: Access is denied." statusDescription="You do not have permission to view this directory or page using the credentials that you supplied." />

                </rule>

            </rules>

        </rewrite>

    </system.webServer>

</configuration>

  RequestBlockingRule1 只允許192.168.0.1單個IP訪問及192.168.1.* 整個C段訪問。

 

  說明:

 

  通過URL重寫功能,可以實現基于URL路徑、用戶代理標頭、IP地址、查詢字符串、引用站點、主機頭的限制,滿足對網站的保護,新網新虛擬主機及馳云主機支持網站自定制的URL重寫功能。

 

  如需要更復雜限制策略,請在本地IIS7以上版本安裝URL重寫模塊進行調試后上傳。

技術問題

免費咨詢獲取折扣

Loading