Enfoque práctico para la configuración del NSG

Guía práctica para NSG y ASG en Azure: reglas de tráfico, buenas prácticas de seguridad, auditoría y pruebas de conectividad. Servicios de seguridad de Q2BSTUDIO.

9 sept 2025 • 3 min read • Q2BSTUDIO Team

Inteligencia-Artificial-

Un Network Security Group NSG es una capa de seguridad en la nube que actúa como un firewall virtual. Filtra el tráfico entrante y saliente hacia y desde recursos como máquinas virtuales subredes o bases de datos mediante reglas que permiten o deniegan tráfico según dirección IP de origen dirección IP de destino puerto y protocolo TCP UDP entre otros.

Paso 1 Crear máquinas virtuales y red. Cree una red virtual ap-vnet con dos subredes llamadas frontend y backend. Despliegue VM1 en la subred frontend y VM2 en la subred backend. Asegúrese de configurar las interfaces de red y los grupos de seguridad de máquina virtual básicos para poder asociar posteriormente las políticas.

Paso 2 Crear Application Security Group ASG. Un Application Security Group ASG permite agrupar máquinas virtuales con funciones similares para aplicar reglas de red de forma lógica sin referirse a IPs concretas. En el portal de Azure vaya a Application Security Groups y cree app-frontend-asg. Luego asocie ese ASG a la interfaz de red de VM1 desde la sección Networking seleccionando Add application security groups y añadiendo app-frontend-asg.

Paso 3 Crear y asociar el Network Security Group. Cree un recurso app-vnet-nsg. Un NSG contiene reglas que controlan el tráfico. Asocie el NSG a la subred backend de ap-vnet desde Settings Subnets + Associate seleccione ap-vnet y la subred Backend y confirme.

Paso 4 Crear reglas del NSG. Añada reglas de entrada y salida según necesidad. Ejemplo de regla de entrada para permitir SSH desde cualquier origen hacia las máquinas del ASG frontend: Source Any Source port ranges * Destination Application security group Destination application security groups app-frontend-asg Service SSH Destination port ranges 22 Protocol Any Action Allow Priority 100 Name AllowSSH. Ajuste prioridades para evitar conflictos y recuerde que reglas con prioridad menor tienen precedencia.

Buenas prácticas y consideraciones. Aplicar el principio de menor privilegio evitando 0.0.0.0 0/0 salvo cuando sea imprescindible usar Application Security Groups para mantener reglas legibles y reutilizables habilitar NSG Flow Logs para auditoría e integración con SIEM probar conectividad con Network Watcher y documentar reglas para cambios futuros. Combine NSG a nivel de subred con reglas adicionales en interfaces de red cuando necesite excepciones puntuales.

Enfoque práctico para la configuración del NSG. Para un despliegue profesional y seguro en Azure es recomendable apoyarse en equipos con experiencia en cloud redes y ciberseguridad. En Q2BSTUDIO ofrecemos servicios integrales desde diseño de arquitecturas cloud hasta implementación de políticas de seguridad y pruebas de intrusión. Si necesita apoyo en la migración o gestión de infraestructuras en la nube puede consultar nuestros servicios cloud Azure y AWS y para auditorías y pruebas de seguridad tenemos soluciones de ciberseguridad y pentesting.

Sobre Q2BSTUDIO. Somos una empresa de desarrollo de software aplicaciones a medida y soluciones tecnológicas. Especialistas en software a medida aplicaciones a medida inteligencia artificial ciberseguridad servicios cloud aws y azure servicios inteligencia de negocio ia para empresas agentes IA y power bi. Diseñamos e integramos soluciones que combinan inteligencia de negocio con automatización y seguridad para potenciar operaciones y reducir riesgos.

Palabras clave integradas. aplicaciones a medida software a medida inteligencia artificial ciberseguridad servicios cloud aws y azure servicios inteligencia de negocio ia para empresas agentes IA power bi.

Si desea una consultoría práctica para la correcta configuración de NSG o desplegar una solución segura y escalable contacte con Q2BSTUDIO para evaluar su arquitectura y diseñar reglas y mecanismos de monitorización adaptados a su negocio.

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.