Port 445 should be diagnosed with both Windows Defender Firewall and Nmap, not one or the other. Windows Defender Firewall shows whether the local Windows host allows SMB traffic. Nmap shows how that same port appears from another machine on the network. SMB commonly uses TCP port 445 for file sharing on Windows systems [source: Microsoft].
TLDR: Windows Defender Firewall checks the local rule. Nmap checks the network result. For example, in a 40-device office, an admin may find that 8 machines have SMB enabled locally, but only 5 appear as open from a scanner because VLAN rules block the other 3. The best test is simple: confirm the SMB rule on the Windows host, then scan TCP 445 from a second trusted machine.
Why port 445 matters
Port 445 is tied to Server Message Block, better known as SMB. Windows uses it for file shares, printer sharing, named pipes, and some admin tasks. If it is open where it should not be, it can expose a machine to unwanted access attempts. If it is blocked where it should be open, users complain that shared folders “just stopped working.”
That is the annoying part. A file share can fail even when the folder permissions are correct. The real problem may be a firewall profile, a blocked subnet, or a router ACL sitting between two machines.
Image not found in postmetaWhat Windows Defender Firewall can prove
Windows Defender Firewall, also called Microsoft Defender Firewall on newer systems, answers one main question: is this Windows device configured to allow SMB?
An admin usually checks these areas:
- Inbound rules: especially File and Printer Sharing (SMB-In).
- Firewall profile: Domain, Private, or Public.
- Scope: allowed local and remote IP addresses.
- Service state: the Server service must be running for file sharing.
- Policy source: local rule, Group Policy, or security baseline.
This is useful because it shows intent. If the SMB inbound rule is disabled on the Public profile, Windows is doing what it was told to do. If the rule is enabled only for a management subnet, that also explains why a user laptop cannot connect.
The catch is that Windows Defender Firewall does not fully show what another device sees. A rule may look fine locally, while a network firewall blocks TCP 445 two switches away. That gap causes a lot of wasted time.
What Nmap can prove
Nmap answers a different question: what does port 445 look like from here? It tests the target from the outside. That makes it great for spotting real access issues.
A basic scan looks like this:
nmap -p 445 192.168.1.25
The common results matter:
- Open: something is listening on TCP 445, and the scanner can reach it.
- Closed: the host replied, but nothing is listening on that port.
- Filtered: a firewall or network device is blocking the probe or reply.
For SMB detail, an admin may run:
nmap -p 445 --script smb-protocols,smb-security-mode 192.168.1.25
That can reveal whether SMB services answer and which SMB details are visible. It should only be used on systems the team is allowed to test. Random SMB scanning is a bad idea and may trigger alerts.
Firewall view vs scanner view
The two tools solve different parts of the same puzzle.
| Tool | Best for | Weak spot |
|---|---|---|
| Windows Defender Firewall | Checking local SMB rules, profiles, and scope | Cannot prove remote reachability |
| Nmap | Testing how TCP 445 appears over the network | Does not explain the local Windows rule by itself |
Honestly, it feels like this should be easier. One screen says the rule is enabled. Another test says the port is filtered. Both can be true. That usually means the block is not on the Windows host, or the wrong firewall profile is active.
A simple diagnostic order
- Check the network location. A Windows machine on the Public profile may block SMB by design.
- Confirm the SMB inbound rule. Look for File and Printer Sharing (SMB-In).
- Check the allowed scope. Make sure the scanner IP is allowed.
- Confirm the service. The Server service must be running.
- Run Nmap from the client subnet. Test from the same place as the affected user.
- Compare results. If Windows allows it but Nmap says filtered, check routers, VLANs, VPN rules, or endpoint security tools.
A clean result is boring, but good: Defender Firewall allows SMB only where needed, and Nmap shows TCP 445 as open only from approved networks. For many offices, that means file servers are reachable from staff subnets, but blocked from guest Wi-Fi and the public internet.
Security notes for port 445
Port 445 should rarely be exposed beyond trusted networks. It should not face the open internet. Admin teams should restrict it by subnet, disable old SMB versions, and avoid broad “allow any” rules.
Good SMB hygiene includes:
- Use least access. Allow only the systems that need file sharing.
- Block guest networks. Guest Wi-Fi should not reach SMB shares.
- Audit exposed hosts. Scan approved ranges on a schedule.
- Disable legacy SMB where possible. Old versions carry extra risk.
- Document exceptions. Mystery firewall rules cause future outages.
FAQ
Is port 445 always dangerous?
No. It is normal on Windows file servers and domain networks. It becomes risky when it is open to untrusted devices or the internet.
Why does Windows Defender Firewall show SMB allowed, but Nmap says filtered?
A network firewall, VLAN rule, VPN policy, or security product may be blocking the traffic before it reaches the Windows host.
What does “closed” mean in Nmap?
It means the target replied, but no service is listening on TCP 445. SMB may be disabled, or the Server service may be stopped.
What does “filtered” mean in Nmap?
It means Nmap did not get a clear reply. A firewall is likely dropping or blocking the packets.
Should SMB be allowed on the Public firewall profile?
Usually no. SMB should be limited to trusted networks such as Domain or approved Private networks.
Which tool should be used first?
For a single Windows host, Defender Firewall is a good first check. For real connectivity from another machine, Nmap should follow right after.
