Always On VPN은 디바이스 또는 컴퓨터에 대한 전용 VPN 프로필을 만드는 기능을 제공합니다. Always on VPN 연결에는 두 가지 유형의 터널이 있습니다.
Device tunnel connects to specified VPN servers before users log on to the device. 사전 로그인 연결 시나리오 및 장치 관리 목적에서는 장치 터널을 사용합니다.
User tunnel connects only after a user logs on to the device. 사용자 터널을 통해 사용자는 VPN 서버를 통해 조직 리소스에 액세스할 수 있습니다.
Unlike user tunnel, which only connects after a user logs on to the device or machine, device tunnel allows the VPN to establish connectivity before the user logs on. Both device tunnel and user tunnel operate independently with their VPN profiles, can be connected at the same time, and can use different authentication methods and other VPN configuration settings as appropriate. 사용자 터널은 SSTP 및 IKEv2를 지원하며 디바이스 터널은 SSTP 대체를 지원하지 않고 IKEv2만 지원합니다.
사용자 터널은 도메인 조인, 비도메인 조인(작업 그룹) 또는 Microsoft Entra ID 조인 장치에서 지원되어 엔터프라이즈 및 BYOD 시나리오를 모두 허용합니다. 모든 Windows 버전에서 사용할 수 있으며, 타사에서는 UWP VPN 플러그인 지원을 통해 플랫폼 기능을 사용할 수 있습니다.
디바이스 터널은 Windows 10 Enterprise 또는 Education 버전 1709 이상을 실행하는 도메인 가입 디바이스에서만 구성할 수 있습니다. 디바이스 터널의 타사 제어는 지원되지 않습니다. 시스템에서 디바이스 터널만 사용하는 경우 이름 확인 정책 테이블(NRPT)을 구성할 수 있습니다. 사용자 터널 및 디바이스 터널이 시스템에서 사용되는 경우 사용자 터널에서만 NRPT(이름 확인 정책 테이블)를 사용할 수 있습니다.
디바이스 터널은 강제 터널을 지원하지 않습니다. 분할 터널로 구성해야 합니다. |
Prerequisites
VPN 연결에 대해 컴퓨터 인증서 인증을 사용하도록 설정하고 들어오는 VPN 연결을 인증하기 위한 루트 인증 기관을 정의해야 합니다.
$VPNRootCertAuthority = "Common Name of trusted root certification authority"
$RootCACert = (Get-ChildItem -Path cert:LocalMachine\root | Where-Object {$_.Subject -Like "*$VPNRootCertAuthority*" })
Set-VpnAuthProtocol -UserAuthProtocolAccepted Certificate, EAP -RootCertificateNameToAccept $RootCACert -PassThru
VPN 디바이스 터널 구성
아래의 샘플 프로필 XML 파일은 디바이스 터널을 통해 클라이언트가 시작하는 풀 요청만 필요한 시나리오에 대한 좋은 지침을 제공합니다. 트래픽 필터를 활용하여 디바이스 터널을 관리 트래픽으로만 제한합니다. 이 구성은 Windows 업데이트, 일반적인 GP(그룹 정책) 및 Microsoft 엔드포인트 구성 관리자 업데이트 시나리오, 캐시된 자격 증명이 없는 첫 번째 로그온을 위한 VPN 연결 또는 암호 재설정 시나리오에서 잘 작동합니다.
WinRM(Windows 원격 관리), 원격 GPUpdate 및 원격 구성 관리자 업데이트 시나리오와 같은 서버 시작 푸시 사례의 경우 디바이스 터널에서 인바운드 트래픽을 허용해야 하므로 트래픽 필터를 사용할 수 없습니다. 디바이스 터널 프로필에서 트래픽 필터를 켜면 디바이스 터널이 인바운드 트래픽을 거부합니다. 이 제한은 향후 릴리스에서 제거될 예정입니다.
샘플 VPN 프로파일 XML
다음은 샘플 VPN profileXML입니다.
<VPNProfile>
<NativeProfile>
<Servers>vpn.contoso.com</Servers>
<NativeProtocolType>IKEv2</NativeProtocolType>
<Authentication>
<MachineMethod>Certificate</MachineMethod>
</Authentication>
<RoutingPolicyType>SplitTunnel</RoutingPolicyType>
<!-- disable the addition of a class based route for the assigned IP address on the VPN interface -->
<DisableClassBasedDefaultRoute>true</DisableClassBasedDefaultRoute>
</NativeProfile>
<!-- use host routes(/32) to prevent routing conflicts -->
<Route>
<Address>10.10.0.2</Address>
<PrefixSize>32</PrefixSize>
</Route>
<Route>
<Address>10.10.0.3</Address>
<PrefixSize>32</PrefixSize>
</Route>
<!-- traffic filters for the routes specified above so that only this traffic can go over the device tunnel -->
<TrafficFilter>
<RemoteAddressRanges>10.10.0.2, 10.10.0.3</RemoteAddressRanges>
</TrafficFilter>
<!-- need to specify always on = true -->
<AlwaysOn>true</AlwaysOn>
<!-- new node to specify that this is a device tunnel -->
<DeviceTunnel>true</DeviceTunnel>
<!--new node to register client IP address in DNS to enable manage out -->
<RegisterDNS>true</RegisterDNS>
</VPNProfile>
각 특정 배포 시나리오의 필요에 따라 장치 터널로 구성할 수 있는 또 다른 VPN 기능은 신뢰할 수 있는 네트워크 탐지입니다.
<!-- inside/outside detection -->
<TrustedNetworkDetection>corp.contoso.com</TrustedNetworkDetection>
배포 및 테스트
Windows PowerShell 스크립트를 사용하고 WMI(Windows Management Instrumentation) 브리지를 사용하여 디바이스 터널을 구성할 수 있습니다. The Always On VPN device tunnel must be configured in the context of the LOCAL SYSTEM account. To accomplish this, it will be necessary to use PsExec, one of the PsTools included in the Sysinternals suite of utilities.
디바이스 (.\Device)
대 사용자별 (.\User)
프로필을 배포하는 방법에 대한 지침은 WMI 브리지 공급자와 함께 PowerShell 스크립팅 사용을 참조하세요.
다음 Windows PowerShell 명령을 실행하여 디바이스 프로필을 성공적으로 배포했는지 확인합니다.
Get-VpnConnection -AllUserConnection
출력에는 디바이스에 배포된 디바이스 전체 VPN 프로필 목록이 표시됩니다.
예시 Windows PowerShell 스크립트
프로필 생성을 위한 스크립트를 직접 작성하는 데 도움이 되는 다음 Windows PowerShell 스크립트를 사용할 수 있습니다.
Param(
[string]$xmlFilePath,
[string]$ProfileName
)
$a = Test-Path $xmlFilePath
echo $a
$ProfileXML = Get-Content $xmlFilePath
echo $XML
$ProfileNameEscaped = $ProfileName -replace ' ', '%20'
$Version = 201606090004
$ProfileXML = $ProfileXML -replace '<', '<'
$ProfileXML = $ProfileXML -replace '>', '>'
$ProfileXML = $ProfileXML -replace '"', '"'
$nodeCSPURI = './Vendor/MSFT/VPNv2'
$namespaceName = "root\cimv2\mdm\dmmap"
$className = "MDM_VPNv2_01"
$session = New-CimSession
try
{
$newInstance = New-Object Microsoft.Management.Infrastructure.CimInstance $className, $namespaceName
$property = [Microsoft.Management.Infrastructure.CimProperty]::Create("ParentID", "$nodeCSPURI", 'String', 'Key')
$newInstance.CimInstanceProperties.Add($property)
$property = [Microsoft.Management.Infrastructure.CimProperty]::Create("InstanceID", "$ProfileNameEscaped", 'String', 'Key')
$newInstance.CimInstanceProperties.Add($property)
$property = [Microsoft.Management.Infrastructure.CimProperty]::Create("ProfileXML", "$ProfileXML", 'String', 'Property')
$newInstance.CimInstanceProperties.Add($property)
$session.CreateInstance($namespaceName, $newInstance)
$Message = "Created $ProfileName profile."
Write-Host "$Message"
}
catch [Exception]
{
$Message = "Unable to create $ProfileName profile: $_"
Write-Host "$Message"
exit
}
$Message = "Complete."
Write-Host "$Message"
Additional Resources
다음은 VPN 배포에 도움이 되는 추가 리소스입니다.
VPN 클라이언트 구성 리소스
다음은 VPN 클라이언트 구성 리소스입니다.
원격 액세스 서버 게이트웨이 리소스
다음은 RAS(원격 액세스 서버) 게이트웨이 리소스입니다.
Important
Microsoft RAS 게이트웨이와 함께 장치 터널을 사용하는 경우, 여기에서 설명한 대로 IKEv2에 대해 컴퓨터 인증서 인증 허용 인증 방법을 활성화하여 IKEv2 컴퓨터 인증서 인증을 지원하도록 RRAS 서버를 구성해야 합니다. Once this setting is enabled, it is strongly recommended that the Set-VpnAuthProtocol PowerShell cmdlet, along with the RootCertificateNameToAccept optional parameter, is used to ensure that RRAS IKEv2 connections are only permitted for VPN client certificates that chain to an explicitly defined internal/private Root Certification Authority. 또는 RRAS 서버의 신뢰할 수 있는 루트 인증 기관 저장소를 수정하여 여기에 설명된 대로 공용 인증 기관이 포함되지 않도록 해야 합니다. 다른 VPN 게이트웨이에도 유사한 방법을 고려해야 할 수 있습니다.