다음을 통해 공유


시스템 FTP 인증 <인증>

개요

요소는 <authentication> 서버의 사이트에 액세스할 수 있는 사용자 계정을 구성하는 데 사용됩니다. 인증을 권한 부여와 함께 사용하여 서버의 콘텐츠에 대한 액세스를 보호합니다. 인증은 사용자의 ID를 확인하지만 권한 부여는 사용자가 액세스할 수 있거나 액세스할 수 없는 리소스를 결정합니다.

IIS는 인증 규칙의 한 가지 유형인 거부 규칙을 정의합니다. 거부 규칙을 사용하면 서버의 사이트에 액세스할 수 없는 사용자 계정 또는 사용자 그룹을 정의할 수 있습니다.

호환성

버전 참고
IIS 10.0 <authentication> 요소가 IIS 10.0에서 수정되지 않았습니다.
IIS 8.5 <authentication> 요소가 IIS 8.5에서 수정되지 않았습니다.
IIS 8.0 요소는 <authentication> IIS 8.0에서 도입되었습니다.
IIS 7.5 해당 없음
IIS 7.0 해당 없음
IIS 6.0 해당 없음

설치 프로그램

FTP 서버에서 인증을 통한 액세스 거부를 지원하려면 FTP 서비스 역할 서비스를 설치해야 합니다.

Windows Server 2012

  1. Windows 로고 키를 누른 다음 서버 관리자 클릭합니다.

  2. 서버 관리자관리를 클릭한 다음 역할 및 기능 추가를 클릭합니다.

  3. 역할 및 기능 추가 마법사에서 다음을 수행합니다.

    • 시작하기 전 페이지에서 다음을 클릭합니다.
    • 설치 유형 페이지에서 설치 유형을 선택하고 다음을 클릭합니다.
    • 서버 선택 페이지에서 적절한 서버를 선택하고 다음을 클릭합니다.
    • 서버 역할 페이지에서 IIS(웹 서버)가 선택되어 있는지 확인하고 확장합니다.
    • FTP 서버를 확장한 다음 FTP 서비스FTP 확장성을 모두 선택한 다음 다음을 클릭합니다.
    • 기능 페이지에서 다음을 클릭합니다.
    • 설치 선택 확인 페이지에서 설치를 클릭합니다.
    • Results(결과) 페이지에서 Close(닫기)를 클릭합니다.

Windows 8

  1. Windows 제어판을 엽니다.
  2. Windows 제어판 프로그램 및 기능을 엽니다.
  3. 프로그램 및 기능에서 Windows 기능 켜기/끄기를 클릭합니다.
  4. Windows 기능 대화 상자에서 인터넷 정보 서비스를 확장한 다음 FTP 서버를 확장합니다.
  5. FTP 서버에서 FTP 서비스FTP 확장성을 선택한 다음 확인을 클릭합니다.

방법

로그온 실패율에 따라 FTP 서버에 대한 액세스를 거부하는 방법

  1. IIS(인터넷 정보 서비스) 관리자를 엽니다.

    • Windows Server 2012 이상을 사용하는 경우:

      • 작업 표시줄에서 서버 관리자 클릭하고 도구를 클릭한 다음 IIS(인터넷 정보 서비스) 관리자를 클릭합니다.
    • Windows 8 이상을 사용하는 경우:

      • Windows 키를 누른 채로 문자 X를 누른 다음 제어판 클릭합니다.
      • 관리 도구를 클릭한 다음 IIS(인터넷 정보 서비스) 관리자를 두 번 클릭합니다.
  2. 연결 창에서 서버를 선택합니다.

  3. 창에서 FTP 로그온 시도 제한 기능을 두 번 클릭합니다.

    F TP 로그 사용 시도 제한 기능이 선택된 홈 창의 이미지.

  4. FTP 로그온 시도 제한 대화 상자에서 사용을 클릭하여 제한을 사용하도록 설정한 다음, 최대 오류 수와 이러한 실패로 인해 FTP 서비스에 대한 액세스가 거부되는 시간 프레임을 입력합니다.

  5. 로그에 쓰기를 클릭하여 조건이 충족되었음을 기록하지만 로그온 시도를 차단하지는 않습니다.

  6. 작업 창에서 적용을 클릭합니다.

구성

요소는 <authentication> 서버 수준에서 구성됩니다.

특성

없음

자식 요소

요소 Description
denyByFailure 선택적 요소입니다.

실패율에 따라 액세스를 거부하도록 FTP 서비스를 구성합니다.

구성 샘플

다음 샘플에서는 요소를 구성합니다 <denyByFailure> .

<system.ftpServer>
   <security>
      <authentication>
         <denyByFailure enabled="true" maxFailure="5" entryExpiration="00:00:45" loggingOnlyMode="false" />
      </authentication>
   </security>
</system.ftpServer>

샘플 코드

다음 코드 샘플은 로그온 실패율에 따라 FTP 서버에 대한 액세스 거부를 구성합니다.

AppCmd.exe

appcmd.exe set config  -section:system.ftpServer/security/authentication /denyByFailure.enabled:"True" /denyByFailure.maxFailure:"10" /denyByFailure.entryExpiration:"00:00:35" /denyByFailure.loggingOnlyMode:"False"  /commit:apphost

참고

AppCmd.exe 사용하여 이러한 설정을 구성할 때 커밋 매개 변수 apphost 를 로 설정해야 합니다. 그러면 구성 설정이 ApplicationHost.config 파일의 적절한 위치 섹션에 커밋됩니다.

C#

using System;
using System.Text;
using Microsoft.Web.Administration;

internal static class Sample {

    private static void Main() {
        
        using(ServerManager serverManager = new ServerManager()) { 
            Configuration config = serverManager.GetApplicationHostConfiguration();
            
            ConfigurationSection authenticationSection = config.GetSection("system.ftpServer/security/authentication");
            
            ConfigurationElement denyByFailureElement = authenticationSection.GetChildElement("denyByFailure");
            denyByFailureElement["enabled"] = true;
            denyByFailureElement["maxFailure"] = 10;
            denyByFailureElement["entryExpiration"] = TimeSpan.Parse("00:00:35");
            denyByFailureElement["loggingOnlyMode"] = false;
            
            serverManager.CommitChanges();
        }
    }
}

VB.NET

Imports System
Imports System.Text
Imports Microsoft.Web.Administration
Module Sample

   Sub Main()
      Dim serverManager As ServerManager = New ServerManager
      Dim config As Configuration = serverManager.GetApplicationHostConfiguration
      Dim authenticationSection As ConfigurationSection = config.GetSection ("system.ftpServer/security/authentication")
      Dim denyByFailureElement As ConfigurationElement = authenticationSection.GetChildElement("denyByFailure")
      denyByFailureElement("enabled") = true
      denyByFailureElement("maxFailure") = 10
      denyByFailureElement("entryExpiration") = TimeSpan.Parse("00:00:35")
      denyByFailureElement("loggingOnlyMode") = false
      serverManager.CommitChanges
   End Sub
End Module

JavaScript

var adminManager = new ActiveXObject('Microsoft.ApplicationHost.WritableAdminManager');
adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST";

var authenticationSection = adminManager.GetAdminSection("system.ftpServer/security/authentication", "MACHINE/WEBROOT/APPHOST");
var denyByFailureElement = authenticationSection.ChildElements.Item("denyByFailure");
denyByFailureElement.Properties.Item("enabled").Value = true;
denyByFailureElement.Properties.Item("maxFailure").Value = 10;
denyByFailureElement.Properties.Item("entryExpiration").Value = "00:00:35";
denyByFailureElement.Properties.Item("loggingOnlyMode").Value = false;

adminManager.CommitChanges();

VBScript

Set adminManager = CreateObject("Microsoft.ApplicationHost.WritableAdminManager")
adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST"

Set authenticationSection = adminManager.GetAdminSection("system.ftpServer/security/authentication", "MACHINE/WEBROOT/APPHOST")
Set denyByFailureElement = authenticationSection.ChildElements.Item("denyByFailure")
denyByFailureElement.Properties.Item("enabled").Value = true
denyByFailureElement.Properties.Item("maxFailure").Value = 10
denyByFailureElement.Properties.Item("entryExpiration").Value = "00:00:35"
denyByFailureElement.Properties.Item("loggingOnlyMode").Value = false

adminManager.CommitChanges()

PowerShell

Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST'  -filter "system.ftpServer/security/authentication/denyByFailure" -name "enabled" -value "True"
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST'  -filter "system.ftpServer/security/authentication/denyByFailure" -name "maxFailure" -value 10
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST'  -filter "system.ftpServer/security/authentication/denyByFailure" -name "entryExpiration" -value "00:00:35"
Set-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST'  -filter "system.ftpServer/security/authentication/denyByFailure" -name "loggingOnlyMode" -value "False"