Skip to content
CYBERLENS / LOOK BENEATH THE SURFACE
← THE JOURNAL / Scripts & applications

Windows and Linux: check the firewall before changing anything.

A small read-only starting point for your own Windows or Ubuntu computer, with interpretation instead of a misleading “secure” badge.

CyberLens Lab•Site publication: 22 Oct 2026•6 min read

Start with an observation

A single command cannot certify a computer as secure. Start by observing one control, understanding the output and documenting the result. These commands inspect firewall settings on your own machine. They do not enable rules, disable protections or scan another device.

Windows: view firewall profiles

Open PowerShell on your own Windows computer. Administrative access may be required to inspect the full configuration.

Get-NetFirewallProfile |
    Select-Object Name, Enabled, DefaultInboundAction, DefaultOutboundAction

The output lists Domain, Private and Public profiles and their configured state. An Enabled value of True is useful evidence, but it does not establish that every rule is appropriate. A default action of NotConfigured requires checking the effective policy and management context; do not guess that it means “allow everything.”

Record the network profile currently used by Windows and review relevant rules before making changes. Keep remote-management access and your recovery route in mind.

Ubuntu: inspect UFW status

On your own Ubuntu laptop, run:

sudo ufw status verbose

Enter your own administrator password in the terminal if asked. The command reports UFW’s state and rules. inactive means UFW is inactive, not that every possible firewall layer is absent. Other nftables rules, a hypervisor or a router may also affect traffic.

Do not paste ufw enable into a remote server session without first planning the required access rules and recovery method. This article deliberately stops at inspection.

Build a short defensive checklist

Record the operating-system version, update status, firewall context, account privileges and backup test date. Use supported software, a standard account for everyday work where practical, MFA for important accounts and a tested recovery copy of important data.

A screenshot of a green status indicator is not proof that malware is absent. If you suspect compromise, document the evidence and follow an incident-response process.

References: Microsoft Get-NetFirewallProfile and Ubuntu firewall documentation. Source checked: 22 October 2026.