Joan zuzenean edukira

Configuración inicial (Windows Server)

1. Cambio de nombre del equipo (hostname)

  • Por qué importa: Un nombre coherente facilita inventario, monitorización, asignación de GPOs y soporte.
  • Cómo hacerlo:
  • GUI: Server Manager → Local Server → Computer name → Change → reinicia.
  • PowerShell:
Rename-Computer -NewName "SRV-AD-01" -Restart

2. Configuración de red

  • Por qué importa: Una IP fija y DNS correctos son críticos para AD, RDP, DNS, comparticiones y servicios.
  • Cómo hacerlo:
  • GUI: Panel de control/Settings → Network → Adapter options → Propiedades del adaptador → IPv4 → configurar IP, máscara, puerta de enlace y DNS.
  • PowerShell (ejemplo):
New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 192.168.10.10 -PrefixLength 24 -DefaultGateway 192.168.10.1
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 192.168.10.11,192.168.10.12

3. Windows Update

  • Por qué importa: Parcheo reduce superficie de ataque, corrige bugs y cumple normativas.
  • Cómo hacerlo:
  • GUI: Server Manager → Local Server → Windows Update → buscar e instalar.
  • PowerShell (PSWindowsUpdate):
Install-Module -Name PSWindowsUpdate -Force
Get-WindowsUpdate -Install -AcceptAll -AutoReboot

4. Zona horaria y NTP

  • Por qué importa: La sincronización de hora es esencial para Kerberos, logs y correlación de eventos.
  • Cómo hacerlo:
  • GUI: Settings → Time & language → Date & time → zona y sincronización.
  • PowerShell/CLI:
tzutil /s "Romance Standard Time"
w32tm /config /manualpeerlist:"time.windows.com" /syncfromflags:manual /update
w32tm /resync

5. Roles y características

  • Por qué importa: Menos roles = menor superficie de ataque y menos mantenimiento.
  • Cómo hacerlo:
  • GUI: Server Manager → Add roles and features → selecciona solo lo necesario.
  • PowerShell (ejemplos):
# Active Directory Domain Services
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
# DNS Server
Install-WindowsFeature DNS -IncludeManagementTools
# File Server
Install-WindowsFeature FS-FileServer

6. Configuración de firewall

  • Por qué importa: Controla el tráfico, limita exposición y cumple políticas de seguridad.
  • Cómo hacerlo:
  • GUI: Windows Defender Firewall with Advanced Security → Inbound/Outbound Rules → habilita las necesarias.
  • PowerShell (ejemplos):
# Ejemplos
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
Enable-NetFirewallRule -DisplayGroup "Windows Management Instrumentation (WMI)"

7. Seguridad básica

  • Por qué importa: Reduce el riesgo inicial, endurece credenciales y asegura trazabilidad de eventos críticos.
  • Cómo hacerlo:
  • GUI: Local Security Policy/Group Policy → Password Policy, Account Lockout, Audit Policy.
  • PowerShell (ejemplos):
# Auditoría amplia de éxito/fracaso
auditpol /set /category:* /success:enable /failure:enable
# BitLocker (según hardware/política)
# manage-bde -on C:

8. Administración remota

  • Por qué importa: Permite operar y automatizar el servidor de forma segura y eficiente.
  • Cómo hacerlo:
  • GUI: En Windows Admin Center, agregar el servidor y habilitar WinRM si se solicita.
  • PowerShell:
Configure-SMRemoting.exe -Enable
Enable-PSRemoting -Force
  • Notas: Instala y registra Windows Admin Center en un servidor de administración.

9. Comparticiones y permisos

  • Por qué importa: Facilita el acceso controlado a datos y aplica mínimo privilegio.
  • Cómo hacerlo:
  • GUI: Propiedades de carpeta → Sharing/Advanced Sharing → Permissions. Pestaña Security (NTFS) para permisos efectivos.
  • PowerShell (ejemplo):
New-SmbShare -Name Datos -Path "D:\Datos" -FullAccess "DOMAIN\\Admins" -ChangeAccess "DOMAIN\\Users"

10. Copias de seguridad y recuperación

  • Por qué importa: Garantiza continuidad (RPO/RTO) y recuperación ante incidentes.
  • Cómo hacerlo:
  • GUI: Windows Server Backup → Backup Schedule/Once → incluir sistema/datos según política.
  • PowerShell (ejemplos wbadmin):
wbadmin enable backup -addtarget:E: -schedule:23:00 -include:C:,D: -quiet
wbadmin start backup -backupTarget:E: -include:D: -quiet

11. Monitorización y registro

  • Por qué importa: Detecta anomalías temprano y soporta investigación/forense.
  • Cómo hacerlo:
  • GUI: Performance Monitor → Data Collector Sets; Event Viewer → Subscriptions (WEF) si procede.
  • PowerShell (ejemplos):
wevtutil sl Security /e:true
wevtutil sl "Microsoft-Windows-Windows Firewall With Advanced Security/Firewall" /e:true

Lista de verificación (Checklist)

  • Nombre del equipo y dominio/WORKGROUP correctos
  • Red con IP fija y DNS corporativo configurados
  • Parches aplicados y reinicio realizado
  • Roles necesarios instalados y verificados
  • Reglas de firewall adecuadas habilitadas
  • Copias de seguridad configuradas y probadas
  • Monitorización y registros operativos

Recursos

  • Windows Admin Center: https://learn.microsoft.com/windows-server/manage/windows-admin-center/overview
  • PowerShell para roles: https://learn.microsoft.com/powershell/module/servermanager/
  • Buenas prácticas de seguridad: https://learn.microsoft.com/windows-server/security/

Práctica AWS relacionada

Si ya lanzaste una instancia en EC2, continúa con estos pasos de configuración inicial: 2. EC2 para Windows Server