StudyToCert

All certifications / Azure Administrator / Lessons

Microsoft Certified: Azure Administrator Associate AZ-104 · Domain 4: Implement and manage virtual networking

Network security groups and application security groups: rule priority, default rules, subnet vs NIC association, effective security rules

▶ Watch the overview video

Last reviewed September 30, 2026 · Leer en español

A network security group (NSG) filters traffic to and from Azure resources in a virtual network with a list of allow and deny rules. Each rule matches on source, source port, destination, destination port and protocol (TCP, UDP, ICMP or any) and has a direction (inbound or outbound), an action and a priority. NSGs are stateful: if an inbound connection is allowed, the return traffic is allowed automatically without an outbound rule. NSGs are the basic layer 3 and layer 4 firewall of every Azure network and appear in almost every networking question.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 7 more sections, 7 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study Azure Administrator for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the Azure Administrator study plan