FirewallWindowsPuertos7 min de lectura

Configurar Windows Firewall

Configurá Windows Firewall con reglas de entrada y salida para controlar el tráfico de red.


Windows Firewall con Seguridad Avanzada te permite controlar el tráfico entrante y saliente de tu VPS.

Abrir Windows Firewall

Desde PowerShell:

powershell
wf.msc

O buscá «Windows Defender Firewall con Seguridad Avanzada» en el menú Inicio.

Perfiles de firewall

  • Dominio: cuando el servidor está en un dominio Active Directory
  • Privado: redes de confianza
  • Público: redes no confiables (el más restrictivo)

Tu VPS usa el perfil Público por defecto.

Crear regla de entrada con PowerShell

Permitir un puerto TCP

powershell
New-NetFirewallRule -DisplayName "Permitir HTTP" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow

New-NetFirewallRule -DisplayName "Permitir HTTPS" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow

Permitir un rango de puertos

powershell
New-NetFirewallRule -DisplayName "Permitir App Puertos" -Direction Inbound -Protocol TCP -LocalPort 8000-8100 -Action Allow

Permitir desde una IP específica

powershell
New-NetFirewallRule -DisplayName "SSH desde oficina" -Direction Inbound -Protocol TCP -LocalPort 22 -RemoteAddress 203.0.113.50 -Action Allow

Listar reglas activas

powershell
Get-NetFirewallRule | Where-Object {$_.Enabled -eq 'True' -and $_.Direction -eq 'Inbound'} | Format-Table DisplayName, Action

Eliminar una regla

powershell
Remove-NetFirewallRule -DisplayName "Permitir HTTP"

Bloquear un puerto

powershell
New-NetFirewallRule -DisplayName "Bloquear Telnet" -Direction Inbound -Protocol TCP -LocalPort 23 -Action Block

Deshabilitar/habilitar el firewall (no recomendado)

powershell
# Deshabilitar (solo para diagnóstico temporal)
Set-NetFirewallProfile -Profile Public -Enabled False

# Habilitar
Set-NetFirewallProfile -Profile Public -Enabled True

Reglas esenciales para tu VPS

powershell
# RDP (ya habilitado por defecto)
New-NetFirewallRule -DisplayName "RDP" -Direction Inbound -Protocol TCP -LocalPort 3389 -Action Allow

# HTTP/HTTPS para web
New-NetFirewallRule -DisplayName "Web HTTP" -Direction Inbound -Protocol TCP -LocalPort 80 -Action Allow
New-NetFirewallRule -DisplayName "Web HTTPS" -Direction Inbound -Protocol TCP -LocalPort 443 -Action Allow

Nota

Tu VPS de Baires Host incluye protección DDoS a nivel de red. Windows Firewall complementa esa protección filtrando tráfico a nivel de sistema operativo.


¿Te resultó útil esta guía?