
실제 활용 사례를 살펴보겠습니다. Windows Active Directory + NPS(내결함성을 위한 두 대의 서버) + 사용자, 도메인 컴퓨터 및 장치에 대한 액세스 제어 및 인증을 위한 802.1x 표준. 이 표준의 이론적 배경은 다음 링크의 위키피디아에서 확인할 수 있습니다.
내 "실험실"은 리소스가 제한되어 있으므로 NPS와 도메인 컨트롤러의 역할은 호환되지만 이러한 중요한 서비스는 여전히 분리하는 것이 좋습니다.
설정(정책) 동기화를 위한 표준 방법 Windows 저는 NPS에 대해 잘 모르기 때문에 작업 스케줄러에서 실행되는 PowerShell 스크립트(제 예전 동료가 작성한 것)를 사용하겠습니다. 도메인 컴퓨터 및 NPS를 지원하지 않는 장치의 인증에 사용할 것입니다. SR 802.1x (휴대폰, 프린터 등) 그룹 정책이 구성되고 보안 그룹이 생성됩니다.
기사 마지막 부분에서는 802.1x 작업의 복잡한 점, 즉 관리되지 않는 스위치, 동적 ACL 등을 사용하는 방법에 대해 설명하겠습니다. 발견된 "결함"에 대한 정보를 공유하겠습니다. .
먼저 장애 조치 NPS를 설치하고 구성하는 것부터 시작하겠습니다. Windows Server 2012R2(2016도 동일): 서버 관리자 -> 역할 및 기능 추가 마법사를 통해 네트워크 정책 서버만 선택합니다.

또는 PowerShell을 사용하여:
Install-WindowsFeature NPAS -IncludeManagementTools
작은 설명 - 이후 PEAP(보호된 EAP) 클라이언트 컴퓨터에서 신뢰할 수 있는 서버의 신뢰성(적절한 사용 권한 포함)을 확인하는 인증서가 반드시 필요합니다. 그런 다음 역할을 설치해야 할 가능성이 높습니다. 인증 기관. 그러나 우리는 다음과 같이 가정할 것입니다. CA 이미 설치하셨군요...
두 번째 서버에서도 동일한 작업을 수행해 보겠습니다. 두 서버 모두에 C:Scripts 스크립트용 폴더를 만들고 두 번째 서버에 네트워크 폴더를 만들어 보겠습니다. SRV2NPS-구성$
첫 번째 서버에서 PowerShell 스크립트를 만들어 보겠습니다. C:스크립트내보내기-NPS-config.ps1 다음 내용으로:
Export-NpsConfiguration -Path "SRV2NPS-config$NPS.xml"
그런 다음 Task Sheduler에서 작업을 구성해 보겠습니다.내보내기-Nps구성"
powershell -executionpolicy unrestricted -f "C:ScriptsExport-NPS-config.ps1"
모든 사용자에 대해 실행 - 가장 높은 권한으로 실행
매일 - 10분마다 작업을 반복합니다. 8시간 이내
백업 NPS에서 구성(정책) 가져오기를 구성합니다.
PowerShell 스크립트를 만들어 보겠습니다.
echo Import-NpsConfiguration -Path "c:NPS-configNPS.xml" >> C:ScriptsImport-NPS-config.ps1
10분마다 실행하는 작업은 다음과 같습니다.
powershell -executionpolicy unrestricted -f "C:ScriptsImport-NPS-config.ps1"
모든 사용자에 대해 실행 - 가장 높은 권한으로 실행
매일 - 10분마다 작업을 반복합니다. 8시간 이내
이제 확인을 위해 서버(!) 중 하나의 NPS에 RADIUS 클라이언트(IP 및 공유 비밀)의 두 스위치, 두 가지 연결 요청 정책을 추가해 보겠습니다. 유선 연결 (조건: "NAS 포트 유형이 이더넷입니다") 및 WiFi-기업 (조건: "NAS 포트 유형은 IEEE 802.11입니다.") 및 네트워크 정책 Cisco 네트워크 장치에 액세스 (네트워크 관리자):
Условия:
Группы Windows - domainsg-network-admins
Ограничения:
Методы проверки подлинности - Проверка открытым текстом (PAP, SPAP)
Параметры:
Атрибуты RADIUS: Стандарт - Service-Type - Login
Зависящие от поставщика - Cisco-AV-Pair - Cisco - shell:priv-lvl=15
스위치 측에서는 다음 설정을 수행합니다.
aaa new-model
aaa local authentication attempts max-fail 5
!
!
aaa group server radius NPS
server-private 192.168.38.151 auth-port 1812 acct-port 1813 key %shared_secret%
server-private 192.168.10.151 auth-port 1812 acct-port 1813 key %shared_secret%
!
aaa authentication login default group NPS local
aaa authentication dot1x default group NPS
aaa authorization console
aaa authorization exec default group NPS local if-authenticated
aaa authorization network default group NPS
!
aaa session-id common
!
identity profile default
!
dot1x system-auth-control
!
!
line vty 0 4
exec-timeout 5 0
transport input ssh
escape-character 99
line vty 5 15
exec-timeout 5 0
logging synchronous
transport input ssh
escape-character 99
구성 후 10분 후에 모든 클라이언트 정책 매개변수가 백업 NPS에 나타나야 하며 domainsg-network-admins 그룹(미리 생성한)의 구성원인 ActiveDirectory 계정을 사용하여 스위치에 로그인할 수 있습니다.
Active Directory 설정으로 넘어가겠습니다. 그룹 및 비밀번호 정책을 생성하고 필요한 그룹을 생성하세요.
그루포바야 폴리티카 컴퓨터-8021x-설정:
Computer Configuration (Enabled)
Policies
Windows Settings
Security Settings
System Services
Wired AutoConfig (Startup Mode: Automatic)
Wired Network (802.3) Policies
NPS-802-1x
Name NPS-802-1x
Description 802.1x
Global Settings
SETTING VALUE
Use Windows wired LAN network services for clients Enabled
Shared user credentials for network authentication Enabled
Network Profile
Security Settings
Enable use of IEEE 802.1X authentication for network access Enabled
Enforce use of IEEE 802.1X authentication for network access Disabled
IEEE 802.1X Settings
Computer Authentication Computer only
Maximum Authentication Failures 10
Maximum EAPOL-Start Messages Sent
Held Period (seconds)
Start Period (seconds)
Authentication Period (seconds)
Network Authentication Method Properties
Authentication method Protected EAP (PEAP)
Validate server certificate Enabled
Connect to these servers
Do not prompt user to authorize new servers or trusted certification authorities Disabled
Enable fast reconnect Enabled
Disconnect if server does not present cryptobinding TLV Disabled
Enforce network access protection Disabled
Authentication Method Configuration
Authentication method Secured password (EAP-MSCHAP v2)
Automatically use my Windows logon name and password(and domain if any) Enabled

보안 그룹을 만들어보자 sg-컴퓨터-8021x-vl100여기서 VLAN 100에 배포하려는 컴퓨터를 추가하고 이 그룹에 대해 이전에 생성된 그룹 정책에 대한 필터링을 구성합니다.

"네트워크 및 공유 센터(네트워크 및 인터넷 설정) - 어댑터 설정 변경(어댑터 설정 구성) - 어댑터 속성"을 열어 "인증" 탭을 보면 정책이 성공적으로 작동했는지 확인할 수 있습니다.

정책이 성공적으로 적용되었다고 확신하면 NPS 및 액세스 수준 스위치 포트에 대한 네트워크 정책 설정을 진행할 수 있습니다.
네트워크 정책을 만들어 보겠습니다. neag-컴퓨터-8021x-vl100:
Conditions:
Windows Groups - sg-computers-8021x-vl100
NAS Port Type - Ethernet
Constraints:
Authentication Methods - Microsoft: Protected EAP (PEAP) - Unencrypted authentication (PAP, SPAP)
NAS Port Type - Ethernet
Settings:
Standard:
Framed-MTU 1344
TunnelMediumType 802 (includes all 802 media plus Ethernet canonical format)
TunnelPrivateGroupId 100
TunnelType Virtual LANs (VLAN)

스위치 포트에 대한 일반적인 설정("다중 도메인" 인증 유형(데이터 및 음성)이 사용되며 MAC 주소로 인증할 수도 있습니다. "전환 기간" 동안에는 매개변수:
authentication event fail action authorize vlan 100
authentication event no-response action authorize vlan 100
VLAN ID는 "격리" ID가 아니지만 모든 것이 제대로 작동하는지 확인할 때까지 성공적으로 로그인한 후 사용자 컴퓨터가 이동해야 하는 ID와 동일합니다. 이러한 동일한 매개 변수는 다른 시나리오에서도 사용할 수 있습니다. 예를 들어 관리되지 않는 스위치가 이 포트에 연결되어 있고 인증을 통과하지 못한 연결된 모든 장치를 특정 VLAN("격리")에 포함시키려는 경우입니다.
802.1x 호스트 모드 다중 도메인 모드의 스위치 포트 설정
default int range Gi1/0/39-41
int range Gi1/0/39-41
shu
des PC-IPhone_802.1x
switchport mode access
switchport nonegotiate
switchport voice vlan 55
switchport port-security maximum 2
authentication event fail action authorize vlan 100
authentication event no-response action authorize vlan 100
authentication host-mode multi-domain
authentication port-control auto
authentication violation restrict
mab
dot1x pae authenticator
dot1x timeout quiet-period 15
dot1x timeout tx-period 3
storm-control broadcast level pps 100
storm-control multicast level pps 110
no vtp
lldp receive
lldp transmit
spanning-tree portfast
no shu
exit
다음 명령을 사용하여 컴퓨터와 휴대폰이 성공적으로 인증을 통과했는지 확인할 수 있습니다.
sh authentication sessions int Gi1/0/39 det
이제 그룹을 만들어 보겠습니다(예: sg-fgpp-mab )를 휴대폰용 Active Directory에 추가하고 테스트를 위해 장치 하나를 추가합니다(제 경우에는 그랜드스트림 GXP2160 마스 주소로 000b.82ba.a7b1 그리고 관련. 계정 도메인 00b82baa7b1).
생성된 그룹에 대해서는 비밀번호 정책 요구 사항을 낮추겠습니다(다음을 사용). 다음 매개변수를 사용하여 Active Directory 관리 센터 -> 도메인 -> 시스템 -> 비밀번호 설정 컨테이너를 통해 MAB에 대한 비밀번호 설정:

따라서 우리는 장치의 mas 주소를 비밀번호로 사용할 수 있도록 허용할 것입니다. 그런 다음 802.1x 방법 mab 인증을 위한 네트워크 정책을 생성할 수 있습니다. 이를 neag-devices-8021x-voice라고 부르겠습니다. 매개변수는 다음과 같습니다:
- NAS 포트 유형 - 이더넷
- Windows 그룹 – sg-fgpp-mab
- EAP 유형: 암호화되지 않은 인증(PAP, SPAP)
- RADIUS 속성 – 공급업체별: Cisco – Cisco-AV-Pair – 속성 값: device-traffic-class=voice
인증에 성공한 후(스위치 포트를 구성하는 것을 잊지 마세요) 포트의 정보를 살펴보겠습니다.
sh 인증 설정 Gi1/0/34
----------------------------------------
Interface: GigabitEthernet1/0/34
MAC Address: 000b.82ba.a7b1
IP Address: 172.29.31.89
User-Name: 000b82baa7b1
Status: Authz Success
Domain: VOICE
Oper host mode: multi-domain
Oper control dir: both
Authorized By: Authentication Server
Session timeout: N/A
Idle timeout: N/A
Common Session ID: 0000000000000EB2000B8C5E
Acct Session ID: 0x00000134
Handle: 0xCE000EB3
Runnable methods list:
Method State
dot1x Failed over
mab Authc Success
이제 약속한 대로 완전히 명확하지 않은 몇 가지 상황을 살펴보겠습니다. 예를 들어, 관리되지 않는 스위치(스위치)를 통해 사용자 컴퓨터와 장치를 연결해야 합니다. 이 경우 포트 설정은 다음과 같습니다.
802.1x 호스트 모드 다중 인증 모드의 스위치 포트 설정
interface GigabitEthernet1/0/1
description *SW – 802.1x – 8 mac*
shu
switchport mode access
switchport nonegotiate
switchport voice vlan 55
switchport port-security maximum 8 ! увеличиваем кол-во допустимых мас-адресов
authentication event fail action authorize vlan 100
authentication event no-response action authorize vlan 100
authentication host-mode multi-auth ! – режим аутентификации
authentication port-control auto
authentication violation restrict
mab
dot1x pae authenticator
dot1x timeout quiet-period 15
dot1x timeout tx-period 3
storm-control broadcast level pps 100
storm-control multicast level pps 110
no vtp
spanning-tree portfast
no shu
추신: 매우 이상한 결함을 발견했습니다. 장치가 이러한 스위치를 통해 연결된 다음 관리되는 스위치에 연결되면 스위치를 재부팅(!)할 때까지 작동하지 않습니다. 다른 방법을 찾지 못했습니다. 아직 이 문제를 해결하려면
DHCP와 관련된 또 다른 사항(ip dhcp 스누핑이 사용되는 경우) - 해당 옵션 없음:
ip dhcp snooping vlan 1-100
no ip dhcp snooping information option
어떤 이유에서인지 IP 주소를 올바르게 가져올 수 없습니다. 이는 DHCP 서버의 기능일 수 있지만
그리고 맥 OS도 마찬가지입니다. Linux (802.1x를 기본적으로 지원하는) 장치는 MAC 주소를 통한 인증이 구성되어 있더라도 사용자 인증을 시도합니다.
기사의 다음 부분에서는 무선용 802.1x의 사용을 살펴보겠습니다(사용자 계정이 속한 그룹에 따라 해당 네트워크(vlan)에 연결되지만 해당 네트워크(vlan)에 "던져"집니다.) 동일한 SSID).
출처 : habr.com
