Rutas NSG en Azure

Protege tu nube con Azure Network Security Groups NSG: control granular de tráfico, mínimo privilegio, service tags y ASG, monitoreo con Flow Logs y buenas prácticas.

7 sept 2025 • 3 min read • Q2BSTUDIO Team

Inteligencia-Artificial-

Azure Network Security Groups: la primera línea de defensa de tu nube

Los Network Security Groups de Azure, NSG, son componentes esenciales para proteger tu infraestructura cloud. Piénsalos como firewalls virtuales que controlan el tráfico de red hacia y desde tus recursos en Azure, asegurando que solo pase lo que realmente debe pasar.

Qué es un NSG

Un NSG contiene reglas que permiten o deniegan tráfico entrante y saliente basadas en:

Dirección IP de origen y destino

Números de puerto

Protocolo TCP, UDP, ICMP

Dirección del flujo inbound o outbound

Características clave

Control granular

Filtra el tráfico en el nivel de subred o de interfaz de red NIC

Aplica reglas distintas a recursos diferentes

Crea políticas de seguridad personalizadas y reutilizables

Reglas predeterminadas

Todo NSG incluye reglas base que se evalúan al final:

Permitir tráfico entrante dentro de la VNet

Permitir tráfico entrante desde Azure Load Balancer

Denegar el resto del tráfico entrante

Permitir todo el tráfico saliente a internet

Filtrado con estado stateful

Los NSG permiten automáticamente el tráfico de retorno de conexiones establecidas, sin necesitar reglas extra para las respuestas.

Buenas prácticas

Principio de mínimo privilegio

Empieza con denegar todo y permite solo lo estrictamente necesario

Audita con frecuencia y elimina reglas no usadas

Utiliza service tags en lugar de rangos IP cuando sea posible

Usa service tags

Algunas etiquetas populares son:

Internet

VirtualNetwork

Storage

SQL

AzureLoadBalancer

Convenciones de nombres

Usa nombres descriptivos para identificar rápidamente el propósito, por ejemplo:

Allow-HTTP-Inbound

Deny-SSH-Internet

Allow-DB-Subnet

Casos de uso comunes

Aplicaciones web

Prioridad 100: permitir HTTP puerto 80 desde Internet

Prioridad 110: permitir HTTPS puerto 443 desde Internet

Prioridad 120: permitir SSH puerto 22 solo desde la subred de administración

Prioridad 130: denegar el resto del tráfico entrante

Capa de base de datos

Prioridad 100: permitir SQL puerto 1433 solo desde la subred de aplicaciones

Prioridad 110: permitir gestión desde la subred de administración

Prioridad 120: denegar todo acceso a internet

Acceso de administración

Prioridad 100: permitir RDP puerto 3389 desde rangos IP corporativos

Prioridad 110: permitir SSH puerto 22 desde la subred del jump box

Prioridad 120: bloquear el resto de protocolos de gestión

Funciones avanzadas

Application Security Groups ASG

Agrupa máquinas virtuales según su rol de aplicación

Simplifica la gestión de reglas

Hace las políticas más legibles

Flow Logs

Monitorea y analiza el tráfico de red

Soluciona problemas de conectividad

Detecta amenazas de seguridad

Reglas de seguridad aumentadas

Usa múltiples rangos IP en una sola regla

Combina service tags con direcciones IP

Define reglas más flexibles y mantenibles

Monitoreo y resolución de problemas

Métricas clave a observar

Paquetes bloqueados y permitidos

Contadores de aciertos por regla

Análisis de flow logs

Problemas frecuentes

Prioridades de reglas en conflicto

Reglas de allow demasiado amplias

Falta de reglas de retorno en protocolos no orientados a conexión

Consejos de seguridad

Auditorías regulares

Revisa las reglas trimestralmente

Elimina reglas obsoletas o no utilizadas

Comprueba accesos excesivamente permisivos

Documentación

Documenta el propósito de cada regla

Mantén un registro de cambios

Crea diagramas de arquitectura

Pruebas

Valida las reglas primero en desarrollo

Usa Network Watcher para comprobaciones

Monitorea tras cada cambio

Cómo te ayuda Q2BSTUDIO

En Q2BSTUDIO somos especialistas en desarrollo de software a medida y aplicaciones a medida, arquitecturas seguras en la nube, inteligencia artificial e ia para empresas, ciberseguridad, servicios inteligencia de negocio y analítica avanzada con power bi. Diseñamos y operamos políticas NSG alineadas con buenas prácticas, automatizamos despliegues y dotamos a tus entornos de agentes IA para detección temprana de riesgos. Descubre cómo optimizar tu infraestructura con nuestros servicios cloud Azure y AWS y fortalece tu postura de seguridad con nuestras soluciones de ciberseguridad y pentesting.

Conclusión

Los Network Security Groups son un pilar de la arquitectura de seguridad en Azure. Configurados con el principio de mínimo privilegio y acompañados de monitoreo y auditorías continuas, ofrecen una protección robusta sin sacrificar la flexibilidad operativa. La seguridad no es un evento único, es un proceso continuo. Con el apoyo de Q2BSTUDIO, integra NSG eficaces en tu estrategia de servicios cloud aws y azure y potencia tu negocio con software a medida, inteligencia artificial y business intelligence con power bi.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Artificial intelligence

AI agents, chatbots, and intelligent assistants that automate tasks and serve your customers 24/7 to improve the efficiency of your business.

More info

Software Development

Web, mobile, and desktop applications, intranets, e-commerce, SaaS, and management platforms designed for your company's specific needs.

More info

Cloud services

Migration, infrastructure, managed hosting, high availability, and security on Microsoft Azure and Amazon Web Services to help your business scale without limits.

More info

Cybersecurity and pentesting

Security audits, penetration testing and protection of applications, data and infrastructure on-premise and cloud, with ethical hacking and regulatory compliance.

More info

Business Intelligence

Dashboards and data analysis with Power BI: we integrate your sources, design dashboards and KPIs and turn your data into decisions.

More info

Process automation

We automate repetitive tasks and connect your applications with n8n, Power Automate, Make, and RPA, eliminating manual work and increasing productivity.

More info

Training for Companies

We train your teams in technology with criteria: web development, databases, Git, best practices and security, automation with n8n, artificial intelligence for companies and creation of AI solutions with Azure AI Foundry.

More info

Code Auditing

We audit the code that you, your team or an AI create: we tell you what is good and what to improve, we secure it and make it ready for production, web or app.

More info

AI Image Generation

We create for you the images that your business needs with artificial intelligence: product, networks, advertising, illustration and avatars. You tell us what you want and we deliver it ready to use.

More info

AI Video Generation

We create videos with artificial intelligence for you: promotional, networking, virtual presenters, dubbing and animations. You tell us the idea and we will deliver it assembled and ready to publish.

More info

AI Conversational Avatars

We create conversational avatars with AI – digital humans with a face and voice – that serve your customers and teams with the knowledge of your company, on your website, interactive monitors, WhatsApp or Teams.

More info

Online Marketing and AI

Google Ads, Meta Ads, LinkedIn Ads and AI Engine Positioning (GEO/AEO): we attract customers and make your brand appear where they search for you, also on ChatGPT, Gemini and Perplexity.

More info

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.

Live Chat