RunBook01 - Error MFA NPS Azure: Certificado de equipo caducado
Criticidad: ALTA — Impacta autenticación MFA RADIUS para VPN, Wi-Fi corporativo y aplicaciones on-prem que delegan en NPS.
Tiempo estimado de resolución: 15–30 min
Responsable: Equipo Infraestructura / Seguridad Perimetral
🎯 Síntoma
Usuarios reportan fallo de autenticación MFA al conectar por VPN (FortiClient / Pulse Secure / RRAS) o al acceder a Wi-Fi corporativo (802.1X).
Logs del servidor NPS (Event Viewer → Applications and Services Logs → Microsoft → Windows → NPS → Operational) muestran:
Event ID 6273 (Audit Failure)
Reason: The connection request was rejected because the certificate used for RADIUS authentication has expired.
O en el cliente VPN:
Error 734: The PPP link control protocol was terminated.
RADIUS server certificate validation failed.
🔍 Causa raíz
El servidor NPS (Windows Server con rol Network Policy Server) utiliza un certificado de equipo (Machine Certificate) para:
- Establecer el túnel RADIUS seguro (RADSEC / PEAP-MSCHAPv2 / EAP-TLS)
- Validarse frente a los clientes (VPN, APs Wi-Fi, switches)
El certificado expiró (fecha Not After superada). Windows no lo renueva automáticamente si:
- La plantilla de certificado no tiene Autoenrollment habilitado
- El servidor no contacta con la CA empresarial (AD CS) por GPO, red o permisos
- El certificado fue emitido manualmente (no via plantilla)
✅ Prerrequisitos
| Requisito | Detalle |
|---|---|
| Acceso | RDP al servidor NPS (nps01.infra.plexus.local, nps02...) con cuenta de administrador de dominio |
| Permisos | Enroll + Autoenroll en la plantilla RAS and IAS Server (o Machine) en la CA emisora |
| Herramientas | certlm.msc, mmc (Certificados → Cuenta de equipo), certutil, PowerShell |
| Ventana de cambio | Ventana de mantenimiento estándar (bajo impacto: renovación es transparente si hay 2+ NPS en LB) |
🛠️ Pasos de diagnóstico
1. Verificar certificado actual
# En el servidor NPS
Get-ChildItem Cert:\LocalMachine\My | Where-Object {
$_.EnhancedKeyUsageList.FriendlyName -like "*Server Authentication*" `
-or $_.Subject -like "*nps*"
} | Select-Object Subject, NotBefore, NotAfter, Thumbprint, Issuer
- Confirmar
NotAfter< hoy → confirmado caducado
2. Comprobar plantilla de autoenrollment
# En la CA (o desde NPS con RSAT)
certutil -Template
Buscar plantilla RAS and IAS Server (OID 1.3.6.1.4.1.311.21.8.3.1.1) o Machine:
- ¿Tiene Autoenrollment = Enabled?
- ¿Grupo Domain Controllers / RAS and IAS Servers con permisos Read, Enroll, Autoenroll?
3. Forzar renovación manual (si autoenroll falla)
# Opción A: Renovación via certreq (si plantilla OK)
certreq -enroll "RAS and IAS Server"
# Opción B: Solicitud manual con certlm.msc
# 1. certlm.msc → Personal → Certificates → Botón derecho → All Tasks → Request New Certificate
# 2. Seleccionar "Active Directory Enrollment Policy" → Next
# 3. Marcar "RAS and IAS Server" (o Machine) → Enroll
4. Verificar nuevo certificado
Get-ChildItem Cert:\LocalMachine\My | Where-Object { $_.NotAfter -gt (Get-Date) -and $_.Subject -like "*nps*" } | Select Subject, NotAfter, Thumbprint
- Debe aparecer nuevo certificado con fecha futura
🔧 Pasos de resolución
A. Renovación rápida (producción con 2+ NPS detrás de LB)
- Drenar tráfico del NPS afectado (quitar del LB / FortiGate / Azure LB backend pool)
- Ejecutar paso 3 (forzar renovación)
- Reiniciar servicio NPS:
Restart-Service IAS -Force
- Validar (ver sección Validación)
- Reintegrar al LB
Nota: Si solo hay 1 NPS, programa ventana de 5 min; la renovación es rápida y los clientes reintentan automáticamente.
B. Si la plantilla NO tiene autoenrollment / falla
- En la CA (
ca01.infra.plexus.local):- Abrir
certsrv.msc→ Certificate Templates → Manage - Duplicar RAS and IAS Server → Nombre:
RAS and IAS Server v2 - Pestaña Security → Añadir grupo
RAS and IAS Servers(oDomain Controllers) → Permisos: Read, Enroll, Autoenroll - Pestaña Subject Name → Supply in the request (si usa CN=FQDN) o Build from AD
- OK → Cerrar
- Abrir
- En CA → Certificate Templates → New → Certificate Template to Issue → Seleccionar
RAS and IAS Server v2 - En NPS →
certlm.msc→ Request New Certificate → Debe aparecer la v2 → Enroll
C. Si la CA no es accesible (red/permisos)
- Escalar a Equipo de PKI / AD CS (ticket urgente)
- Workaround temporal: emitir certificado manual en CA web (
https://ca01.infra.plexus.local/certsrv) → Request a certificate → Advanced → Plantilla RAS and IAS Server → Submit → Exportar.pfx→ Importar en NPS (certlm.msc→ Personal → Import)
✅ Validación post-cambio
| Comprobación | Comando / Acción | Resultado esperado |
|---|---|---|
| Certificado válido | Get-ChildItem Cert:\LocalMachine\My | ? NotAfter -gt (Get-Date) | ? Subject -like "*nps*" | Nuevo cert con NotAfter > hoy + 1-2 años |
| Servicio NPS OK | Get-Service IAS | Running |
| Event Viewer limpio | Get-WinEvent -LogName "Microsoft-Windows-NPS/Operational" -MaxEvents 20 | ? Id -eq 6273 | Cero eventos 6273 nuevos |
| Test RADIUS local | radtest -x user@plexus.es password nps01 1812 testing123 (si freeradius-utils instalado) | Access-Accept |
| Test real VPN | Conectar con FortiClient / Pulse Secure usuario de prueba | Conexión exitosa, MFA push llega a Azure MFA / Authenticator |
| Test Wi-Fi 802.1X | Asociar dispositivo corporativo a SSID Plexus-Corp | Autenticación OK, IP asignada |
🔄 Rollback
Si el nuevo certificado causa problemas (raro):
- Volver al certificado anterior (todavía en store aunque expirado):
# Identificar thumbprint antiguo$old = (Get-ChildItem Cert:\LocalMachine\My | Where-Object { $_.NotAfter -lt (Get-Date) -and $_.Subject -like "*nps*" } | Sort-Object NotAfter -Descending)[0].Thumbprint# Cambiar binding NPS al cert antiguo (si NPS lo permite vía netsh)netsh nps set globalcertificatethumbprint $oldRestart-Service IAS -Force
- Documentar en ticket y escalar a PKI para re-emisión correcta.
📋 Checklist de cierre
- Certificado renovado y válido en todos los NPS del cluster
- Event Viewer sin errores 6273 durante 15 min
- Pruebas VPN + Wi-Fi + Apps RADIUS OK
- Ticket actualizado con thumbprint nuevo, fecha expiración, pasos seguidos
- Alerta de monitorización (Check_MK / Zabbix / SCOM) certificado NPS → verde
- Notificar en
#infra-ops: "✅ RunBook01 ejecutado — NPS cert renovado en nps01/nps02"
📚 Referencias
- Microsoft: Configure NPS for RADIUS authentication
- AD CS: Autoenrollment best practices
- Plexus Wiki: Infraestructura → NPS / RADIUS
- RunBook relacionado: RunBook02 - Rotación certificados AD CS
🏷️ Metadata
| Campo | Valor |
|---|---|
| ID | RB-001 |
| Versión | 1.0 |
| Autor | Equipo Infraestructura |
| Revisión | Trimestral (coincide con caducidad cert ~1-2 años) |
| Próxima revisión | (Get-Date).AddMonths(3).ToString('yyyy-MM-dd') |
| Clasificación | Interno - Confidencial |