Pag-configure sa 802.1X sa Cisco Switches Gamit ang Failover NPS (Windows RADIUS nga adunay AD)

Pag-configure sa 802.1X sa Cisco Switches Gamit ang Failover NPS (Windows RADIUS nga adunay AD)
Atong tagdon sa praktis ang paggamit sa Windows Active Directory + NPS (2 servers for fault tolerance) + 802.1x standard alang sa access control ug authentication sa mga user - domain computers - devices. Mahimo nimong masinati ang teorya sumala sa sumbanan sa Wikipedia, sa link: IEEE 802.1X

Tungod kay ang akong "laboratoryo" limitado sa mga kahinguhaan, ang NPS ug ang mga papel sa tigkontrol sa domain managsama, apan girekomenda ko nga imong ibulag ang ingon nga mga kritikal nga serbisyo.

Wala ko kahibalo sa standard nga mga paagi sa pag-synchronize sa mga configuration (mga polisiya) sa Windows NPS, mao nga gamiton namo ang PowerShell scripts nga gilusad sa task scheduler (ang tagsulat mao ang akong kanhing kauban). Alang sa panghimatuud sa mga kompyuter sa domain ug alang sa mga aparato nga wala mahibal-an kung giunsa 802.1x (mga telepono, printer, ug uban pa), ang polisiya sa grupo ma-configure ug ang mga grupo sa seguridad pagahimoon.

Sa katapusan sa artikulo, sultihan ko ikaw bahin sa pipila ka mga kakuti sa pagtrabaho kauban ang 802.1x - kung giunsa nimo magamit ang wala madumala nga mga switch, dinamikong ACL, ug uban pa. Ipaambit nako ang kasayuran bahin sa mga "glitches" nga nakuha .

Magsugod kita sa pag-instalar ug pag-configure sa failover NPS sa Windows Server 2012R2 (ang tanan parehas sa 2016): pinaagi sa Server Manager -> Add Roles and Features Wizard, pilia lamang ang Network Policy Server.

Pag-configure sa 802.1X sa Cisco Switches Gamit ang Failover NPS (Windows RADIUS nga adunay AD)

o uban sa PowerShell:

Install-WindowsFeature NPAS -IncludeManagementTools

Usa ka gamay nga pagpatin-aw - sama sa Gipanalipdan nga EAP (PEAP) siguradong kinahanglan nimo ang usa ka sertipiko nga nagpamatuod sa pagkakasaligan sa server (nga adunay angay nga mga katungod nga gamiton), nga masaligan sa mga kompyuter sa kliyente, nan lagmit kinahanglan nimo usab nga i-install ang papel Awtoridad sa Sertipikasyon. Apan atong i-assume kana CA gi install na nimo...

Buhaton nato ang sama sa ikaduhang server. Magbuhat ta og folder para sa C: Scripts script sa duha ka server ug network folder sa ikaduhang server SRV2NPS-config$

Magbuhat ta ug PowerShell script sa unang server C:ScriptsExport-NPS-config.ps1 uban sa mosunod nga sulod:

Export-NpsConfiguration -Path "SRV2NPS-config$NPS.xml"

Pagkahuman niana, i-set up ang buluhaton sa Task Scheduler: "Export-NpsConfiguration"

powershell -executionpolicy unrestricted -f "C:ScriptsExport-NPS-config.ps1"

Pagdagan alang sa tanan nga tiggamit - Pagdagan nga adunay labing taas nga mga pribilehiyo
Adlaw-adlaw - Balika ang buluhaton matag 10 minuto. sulod sa 8 ka oras

Sa backup nga NPS, i-configure ang configuration (policy) import:
paghimo og PowerShell script:

echo Import-NpsConfiguration -Path "c:NPS-configNPS.xml" >> C:ScriptsImport-NPS-config.ps1

ug usa ka buluhaton nga ipatuman kini matag 10 ka minuto:

powershell -executionpolicy unrestricted -f "C:ScriptsImport-NPS-config.ps1"

Pagdagan alang sa tanan nga tiggamit - Pagdagan nga adunay labing taas nga mga pribilehiyo
Adlaw-adlaw - Balika ang buluhaton matag 10 minuto. sulod sa 8 ka oras

Karon, alang sa pag-verify, idugang nato sa NPS sa usa sa mga server (!) Pipila ka switch sa mga kliyente sa RADIUS (IP ug Shared Secret), duha ka mga polisiya sa hangyo sa koneksyon: WIRED Connect (Kondisyon: "Ang tipo sa port sa NAS mao ang Ethernet") ug WiFi-Entreprise (Kondisyon: "Ang tipo sa port sa NAS mao ang IEEE 802.11") ug ang palisiya sa network Pag-access sa Cisco Network Devices (Mga Admin sa Network):

Условия:
Π“Ρ€ΡƒΠΏΠΏΡ‹ Windows - domainsg-network-admins
ΠžΠ³Ρ€Π°Π½ΠΈΡ‡Π΅Π½ΠΈΡ:
ΠœΠ΅Ρ‚ΠΎΠ΄Ρ‹ ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΊΠΈ подлинности - ΠŸΡ€ΠΎΠ²Π΅Ρ€ΠΊΠ° ΠΎΡ‚ΠΊΡ€Ρ‹Ρ‚Ρ‹ΠΌ тСкстом (PAP, SPAP)
ΠŸΠ°Ρ€Π°ΠΌΠ΅Ρ‚Ρ€Ρ‹:
Атрибуты RADIUS: Π‘Ρ‚Π°Π½Π΄Π°Ρ€Ρ‚ - Service-Type - Login
ЗависящиС ΠΎΡ‚ поставщика - Cisco-AV-Pair - Cisco - shell:priv-lvl=15

Sa kilid sa switch, ang mosunod nga mga setting:

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

Human sa pag-set, human sa 10 minutos, ang tanan nga mga setting sa polisiya kinahanglan nga makita sa backup nga NPS ug kita maka-log in sa mga switch gamit ang ActiveDirectory account, usa ka miyembro sa domainsg-network-admins nga grupo (nga among gibuhat daan).

Mopadayon kita sa pag-configure sa Active Directory - paghimo og polisiya sa grupo ug password, paghimo sa gikinahanglan nga mga grupo.

Polisiya sa Grupo Mga Kompyuter-8021x-Mga Setting:

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

Pag-configure sa 802.1X sa Cisco Switches Gamit ang Failover NPS (Windows RADIUS nga adunay AD)

Magbuhat ta ug grupo sa seguridad sg-computers-8021x-vl100, diin magdugang mi og mga kompyuter nga gusto namong iapud-apod sa vlan 100 ug i-set up ang pagsala para sa nabuhat na nga polisiya sa grupo para niini nga grupo:

Pag-configure sa 802.1X sa Cisco Switches Gamit ang Failover NPS (Windows RADIUS nga adunay AD)

Mahimo nimong sigurohon nga malampuson nga nagtrabaho ang polisiya pinaagi sa pag-abli sa "Network and Sharing Center (Network and Internet settings) - Usba ang mga setting sa adapter (Pag-configure sa mga setting sa adapter) - Adapter properties", diin atong makita ang tab nga "Authentication":

Pag-configure sa 802.1X sa Cisco Switches Gamit ang Failover NPS (Windows RADIUS nga adunay AD)

Kung kombinsido ka nga ang polisiya malampuson nga gigamit, mahimo nimong ipadayon ang pag-set up sa polisiya sa network sa NPS ug access level switch ports.

Magbuhat ta ug polisiya sa network neag-computers-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)

Pag-configure sa 802.1X sa Cisco Switches Gamit ang Failover NPS (Windows RADIUS nga adunay AD)

Kasagaran nga mga setting alang sa switch port (palihug timan-i nga ang "multi-domain" nga tipo sa pag-authenticate gigamit - Data & Tingog, ug adunay usab posibilidad sa pag-authenticate pinaagi sa mac address. Atol sa "panahon sa transisyon", makatarunganon nga gamiton sa mga parameter:


authentication event fail action authorize vlan 100
authentication event no-response action authorize vlan 100

Ang vlan id dili "quarantine", apan ang parehas nga kinahanglan makuha sa computer sa gumagamit pagkahuman malampuson nga pag-log in - hangtod masiguro namon nga ang tanan molihok sama sa kinahanglan. Ang parehas nga mga parameter mahimong magamit sa ubang mga senaryo, pananglitan, kung ang usa ka wala madumala nga switch gisaksak sa kini nga pantalan ug gusto nimo nga ang tanan nga mga aparato konektado niini ug dili mapamatud-an nga mahulog sa usa ka piho nga vlan ("quarantine").

ibalhin ang mga setting sa port sa 802.1x host-mode multi-domain mode

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

Mahimo nimong masiguro nga ang telepono sa kompyuter malampuson nga nakapasar sa pag-authenticate gamit ang mando:

sh authentication sessions int Gi1/0/39 det

Karon maghimo kita og grupo (pananglitan, sg-fgpp-mab ) sa Aktibo nga Direktoryo para sa mga telepono ug pagdugang usa ka aparato sa pagsulay niini (sa akong kaso, kini Grandstream GXP2160 nga adunay mas address 000b.82ba.a7b1 ug acc. asoy domain 00b82baa7b1).

Alang sa gibuhat nga grupo, ipaubos ang mga kinahanglanon sa palisiya sa password (gamit ang Maayo nga mga Patakaran sa Password pinaagi sa Active Directory Administrative Center -> domain -> System -> Password Settings Container) uban niini nga mga parameter Password-Settings-para-MAB:

Pag-configure sa 802.1X sa Cisco Switches Gamit ang Failover NPS (Windows RADIUS nga adunay AD)

kini magtugot kanato sa paggamit sa mas-address sa mga himan ingon nga mga password. Human niana makahimo kita og polisiya sa network alang sa 802.1x nga pamaagi mab authentication, tawgon nato kini nga neag-devices-8021x-voice. Ang mga parameter mao ang mosunod:

  • Type sa NAS Port - Ethernet
  • Mga Grupo sa Windows – sg-fgpp-mab
  • Mga Uri sa EAP: Wala ma-encrypt nga panghimatuud (PAP, SPAP)
  • Mga Katangian sa RADIUS - Piho nga Tigbaligya: Cisco - Cisco-AV-Pair - Balor sa hiyas: device-traffic-class=tingog

pagkahuman sa malampuson nga pag-authenticate (ayaw kalimti ang pag-configure sa switch port), tan-awon naton ang kasayuran gikan sa pantalan:

sh authentication se int 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

Karon, ingon sa gisaad, tagda ang pipila ka dili kaayo klaro nga mga sitwasyon. Pananglitan, kinahanglan natong ikonektar ang mga kompyuter ug device sa mga tiggamit pinaagi sa dili madumala nga switch (switch). Sa kini nga kaso, ang mga setting sa pantalan alang niini ingon niini:

ibalhin ang mga setting sa port sa 802.1x host-mode multi-auth mode

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

PS Usa ka katingad-an nga glitch ang namatikdan - kung ang aparato konektado pinaagi sa ingon nga switch, ug dayon kini gisaksak sa usa ka gidumala nga switch, nan DILI kini molihok hangtod nga mag-reboot (!) Ang switch. Wala ako nakit-an nga mga paagi aron masulbad kini nga problema.

Laing punto nga may kalabutan sa DHCP (kung gigamit ang ip dhcp snooping) - kung wala kini nga mga kapilian:

ip dhcp snooping vlan 1-100
no ip dhcp snooping information option

sa pipila ka rason, dili nako makuha ang saktong ip address ... bisan tuod kini mahimong bahin sa among DHCP server

Usab, ang Mac OS & Linux (diin ang 802.1x nga suporta kay lumad) mosulay sa pag-authenticate sa user, bisan kung ang authentication pinaagi sa mac address gi-configure.

Sa sunod nga bahin sa artikulo, atong hisgotan ang paggamit sa 802.1x para sa Wireless (depende sa grupo nga sakop sa user account, atong "ilabay" kini sa angay nga network (vlan), bisan pa sila magkonektar sa parehas nga SSID).

Source: www.habr.com

Idugang sa usa ka comment