Admin Power
Chapter 13 of 18
Chapter 13: Control Who Gets In and Out
This chapter is about the Windows firewall, which is the guard at the door of your computer network. You will learn how profiles work, how to read the rules that already exist, and how to make a narrow rule of your own. That matters because an open door in the wrong place can let in traffic you never meant to allow, while a door closed too tightly can break a service you need. You will learn to check the network profile first, then read the rule, then change only what is needed. After this chapter, you will be able to explain Domain, Private, and Public profiles, find a rule by name, enable a disabled rule, and create or change a rule without opening it up wider than it needs to be.
2 lessons 3 learning objectives 1 diagram 6 related commands
Topics at a glance: Firewall profiles, rules, and connection profiles, Create, modify, and enable firewall rules.
Where this chapter fits
This chapter comes after Chapter 12: Let the Computer Do the Work on Time in the journey, so ideas from that chapter will feel familiar here.
After this chapter comes Chapter 14: Set Rules Once, Apply Them Everywhere.
Learning objectives
By the end of this chapter, you will be able to:
- Read firewall profiles and connection profiles
- List and filter firewall rules
- Create, enable, and modify a firewall rule
Lessons in this chapter
Work through the lessons in order. Each lesson page has explanations, examples, common mistakes, and a knowledge check.
Lesson 1: Firewall profiles, rules, and connection profiles
A profile is a set of firewall settings for a network type: Domain, Private, or Public. A rule allows or blocks traffic for a program or port. A connection profile says which profile an adapter currently uses.
3 things to learn in this lesson
Lesson 2: Create, modify, and enable firewall rules
New-NetFirewallRule creates a rule. Set-NetFirewallRule changes one, and Enable-NetFirewallRule turns a disabled rule on. Each rule should be as narrow as possible: one program or port, one direction, one profile.
3 things to learn in this lesson
Diagrams in this chapter
These diagrams come from lessons in this chapter. Tap a stage in a diagram to see what it does.
Firewall rule checks (from the lesson: Create, modify, and enable firewall rules)
Choose a stage above to see what it does.
Related command references
These command pages are linked to lessons in this chapter. Each command page has its syntax, parameters, and examples.
Get-NetFirewallProfile
Shows firewall profiles: Domain, Private, and Public.
From the lesson: Firewall profiles, rules, and connection profiles
Get-NetFirewallRule
Lists firewall rules with direction, action, and state.
From the lesson: Firewall profiles, rules, and connection profiles
Enable-NetFirewallRule
Enables a disabled firewall rule.
From the lesson: Create, modify, and enable firewall rules
Set-NetFirewallRule
Changes a firewall rule in place.
From the lesson: Create, modify, and enable firewall rules
New-NetFirewallRule
Creates a firewall rule.
From the lesson: Create, modify, and enable firewall rules
Get-NetConnectionProfile
Shows the network profile for each adapter.
From the lesson: Firewall profiles, rules, and connection profiles
Tip: read the lesson first, then use the command page as a quick reference.