Your Windows Server has a firewall built in, and your office internet router has another. Between them they decide who on the internet, and who on your own network, can reach the server. Most owners assume both are doing their job. This post is a Windows server firewall check you can run in about fifteen minutes: three things to look at, the commands to look with, and what to do (and not do) with what you find.
What the Windows firewall does, and does not, do
Windows Defender Firewall works in two directions, and it treats them differently. By default it blocks unsolicited inbound connections unless an allow rule lets them in, and it allows outbound connections unless a rule blocks them. Microsoft describes this, and recommends keeping it, in its guide to Windows Firewall rules. Two more rules from that page are worth knowing: an explicit block rule beats any allow rule, and an allow rule beats the default block.
So the firewall controls which services on the server can be reached from outside. It does not, out of the box, stop the server talking out to the internet, and it does not tell you who is using the doors that are open.
It also has three profiles, Domain, Private and Public, with separate on/off switches. Windows applies one of them depending on the network the server is connected to. A firewall that is on for Domain but off for Private looks fine at a glance and is wide open in practice.
Check 1: is the firewall on for every profile?
Open PowerShell as administrator on the server and run:
Get-NetFirewallProfile -PolicyStore ActiveStore | Format-Table Name, Enabled, DefaultInboundAction, DefaultOutboundAction
Get-NetConnectionProfile | Format-Table Name, InterfaceAlias, NetworkCategory
The first line shows the settings actually in force, including any set by Group Policy. You want Enabled to read True for Domain, Private and Public, and DefaultInboundAction to read Block. The second line shows which profile (NetworkCategory) your network connection is using right now.
If a profile is off, it needs to go back on, but do it with your IT person on hand. Software that only worked because the firewall was off, such as Tally’s client/server connection, shared folders or a database, will stop working for staff PCs until it has its own allow rule, limited to the office network. If Group Policy turned the firewall off, switching it on locally will not stick; the policy has to change.
Check 2: which risky ports are open, and to whom?
A Windows Server always has dozens of inbound allow rules. Most belong to Windows or to software you installed, and they are normal. The ones to look at closely are the ports attackers scan for: Remote Desktop (3389), file sharing (445), WinRM remote management (5985 and 5986), SQL Server (1433) and Tally’s client/server port (9000 by default). This lists the enabled inbound allow rules for those ports and the remote addresses each one accepts:
Get-NetFirewallPortFilter -Protocol TCP | Where-Object { $_.LocalPort -in '3389','445','5985','5986','1433','9000' } | ForEach-Object { $r = $_ | Get-NetFirewallRule; if ($r.Enabled -eq 'True' -and $r.Direction -eq 'Inbound' -and $r.Action -eq 'Allow') { [pscustomobject]@{ Rule = $r.DisplayName; Port = ($_.LocalPort -join ','); Remote = (($r | Get-NetFirewallAddressFilter).RemoteAddress -join ',') } } } | Format-Table -AutoSize
A Remote column that says Any means the rule accepts connections from any address, including the internet if traffic can get that far. LocalSubnet or a list of specific addresses means it is limited. If you prefer the screen to the command line, open wf.msc, click Inbound Rules, sort by Local Port and read the Remote Address column.
Do not disable rules just because you do not recognise them. A rule with an unfamiliar name may be the one that lets staff reach Tally, the shared drive or the backup software. Write down the rule name and port, and ask your IT person what it is for. Rules that should stay but say Any can usually be limited to the office network instead of being switched off. Our posts on port 445, WinRM 5985/5986 and SQL Server port 1433 show how to do that safely for each one.
Check 3: the router’s port-forwards
In most offices the server sits behind the router your ISP supplied. The router hides the server from the internet, and nothing outside can reach it unless the router has a port-forward (often listed as “Port Forwarding”, “Virtual Server” or “NAT”) that sends a port to the server’s address. That forward, not the Windows rule, is usually what exposes an office server. A typical example is 3389 forwarded so staff can use Remote Desktop from home in tax season.
Log in to the router, or ask your ISP or IT vendor to, and list every forward that points at the server. To test from the outside, take a Windows laptop off the office network (a phone hotspot will do) and run this, replacing the example address with your office’s public IP:
Test-NetConnection -ComputerName 203.0.113.10 -Port 3389
If TcpTestSucceeded comes back True, that port is reachable from the internet. Repeat for the other ports above. If Remote Desktop is reachable, restrict it: the fix is to close the forward and give remote staff a private route in, such as Prixl Guard Secure Access, which needs no router setup and no static IP, or a VPN. Changing the port number only reduces log noise. Our guide to RDP security covers the full order of steps.
What about outbound rules?
Because outbound traffic is allowed by default, malware that does get onto the server can usually talk out freely. Blocking outbound traffic by default is possible, but it breaks Windows Update, antivirus updates and most business software until every program has a rule. Microsoft suggests it only for high-security setups. For a small office, keep outbound at the default and put the effort into the three checks above.
A firewall can change without anyone noticing
A firewall you checked in January can be off in March. Someone switches it off “for a minute” to get a program working; an installer adds a rule open to Any; a remote-support session changes a setting. Nothing on the screen tells you. That quiet change is also one of the signs a server may have been compromised, because attackers often loosen the firewall once they are in.
Prixl Warden covers both halves of that. Its security audit checks each firewall profile and the risky ports above (3389, 445, 5985, 5986 and 1433), and turning a profile back on is one of the one-click fixes on paid plans. Between audits, Warden alerts you by email when the Windows firewall is switched off or its rules are changed, with a plain-English explanation of what changed. Its Open Ports tab lists every port the server is listening on and lets you restrict one to the office network. What it cannot see is your router, so check 3 stays a job for you or your IT vendor.
You can run the audit on your own server. Start your 30-day free trial.

