Security operations

What Is Firewall Software? Types, How It Works and How to Set It Up

Firewall software is the gatekeeper between your devices and the internet. Here is how it inspects traffic, which type fits your setup, and the rules that keep you safe.

Cysoro Security TeamPublished · 7 min read
SECURITY OPERATIONS FIREWALL SOFTWARE The gatekeeper between your devices and the internet — explained. RULES ALLOW 443 HTTPS ALLOW 22 SSH (VPN) DENY ALL ELSE × blocked ✓ allowed cysoro.com
Quick answer

Firewall software is a program that monitors and filters network traffic entering and leaving a device or network, allowing or blocking each connection based on security rules. It checks IP addresses, ports, protocols and applications, blocks unsolicited inbound traffic, and can stop malware from phoning home — but it cannot stop malware you install yourself.

Key takeaways

  • Firewall software filters traffic by IP, port, protocol and application, blocking unsolicited inbound connections by default.
  • Built-in firewalls in Windows, macOS and Linux already cover most home users; businesses add network and next-generation firewalls.
  • Deny-by-default rules, logging and regular rule reviews matter more than which brand you buy.

Every device you own is constantly probed from the internet. Automated scanners test open ports, bots try known exploits, and malware looks for a way in. Firewall software is the gatekeeper that decides which of those connections get through — and which get dropped silently at the door.

What is firewall software?

Firewall software is a program that monitors network traffic entering and leaving a device or network and allows or blocks each connection based on a set of security rules. It inspects the source and destination addresses, ports, protocols and, in more advanced products, the application and the contents of the traffic itself.

NIST defines firewalls as devices or programs that control the flow of network traffic between networks or hosts with different security postures, and its guidance on firewalls and firewall policy covers everything from packet filtering to proxies. The core idea has not changed since the first firewalls: decide, for every connection, whether it is wanted.

A firewall is not the same as antivirus. Antivirus looks for malicious files already on your device. A firewall controls the network conversations your device is allowed to have. You need both, and CISA's advice is blunt: the decision to use a firewall matters more than which type you pick.

How does firewall software work?

Firewall software sits in the path of network traffic and evaluates each packet or connection against its rule set. The decision is binary — allow or deny — but the depth of inspection varies enormously, from checking a few header fields to opening the packet and reading its contents.

A single connection typically passes through these checks:

  1. Packet headers. The firewall reads the source and destination IP addresses, port numbers and protocol. That is enough for basic packet filtering.
  2. Connection state. Stateful firewalls track whether a packet belongs to an established, legitimate session, and block out-of-sequence or unsolicited packets.
  3. Application and payload. Deep packet inspection opens the data portion of the packet to look for malware signatures, application-specific commands or policy violations. Next-generation firewalls operate at this level.
  4. Action and logging. The firewall allows, blocks or quarantines the traffic, then logs the decision so administrators can see what was stopped and why.
How a packet travels through firewall softwareInternetscanners, bots,legitimate usersFirewall software1. Check headers2. Check connection state3. Inspect payloadYour deviceallowed trafficonlyBlocked traffic is dropped and loggedDefault rule: deny everything that is not explicitly allowed
Traffic is inspected in stages; only connections matching an allow rule reach your device. Illustration by Cysoro.

Most host firewalls also apply different rules per network. Windows Firewall, for example, uses domain, private and public profiles: a coffee-shop Wi-Fi connection gets stricter rules than your home network, automatically, as Microsoft's Windows Firewall documentation explains.

What are the main types of firewall software?

Firewalls are usually grouped by how they inspect traffic and by where they run. The inspection method decides what they can see; the location decides what they can protect.

TypeHow it decidesBest forLimitation
Packet-filteringIP address, port, protocolFast, simple edge filteringNo context; easy to fool
Stateful inspectionHeaders plus connection stateMost home and office networksCannot see inside the payload
Proxy / application-levelActs as intermediary for an app protocolControlling specific servicesSlower; one proxy per protocol
Next-generation (NGFW)Application, user, payload, IPSBusinesses needing deep controlCost and management overhead
Web application firewall (WAF)HTTP requests to web apps and APIsBlocking SQL injection, XSSOnly protects web traffic
Host-based (personal)Per-application rules on one deviceLaptops and remote workersMust be managed per device
Cloud / FWaaSPolicy enforced in the cloudDistributed teams, remote usersDepends on the provider

For a home user, the built-in host firewall is usually enough. For a business, the practical stack is a network firewall at the edge, host firewalls on endpoints, and a WAF in front of any public web application.

Firewall software vs hardware firewall: what's the difference?

A hardware firewall is a physical device, usually built into your router, that sits between your network and the internet and protects every device behind it. Firewall software runs on an individual device and controls that device's own traffic, including which applications may connect to the internet.

The two complement each other. A hardware firewall stops an unsolicited connection before it reaches your laptop. A software firewall stops a malicious program already on your laptop from phoning home — something the hardware firewall at the edge often cannot see, because the traffic looks like an ordinary outbound connection.

CISA recommends using both: enable the firewall in your router and the built-in firewall on every computer, even if you already have an external one. If you work from coffee shops or airports, the software firewall is the only one travelling with you.

What features should good firewall software have?

Not every firewall needs every feature, but these are the ones worth checking before you choose or configure one:

  • Two-way filtering. It should control outbound traffic as well as inbound, so malware cannot quietly exfiltrate data.
  • Application control. Rules by program, not just by port — so only your browser and email client may use the web, for example.
  • Stateful inspection. The minimum for a modern firewall; stateless packet filtering alone is too easy to bypass.
  • Intrusion prevention. Built-in or add-on IPS that blocks known attack patterns, not just ports.
  • Logging and alerts. A record of blocked connections, with alerts for repeated attempts, so you can spot a scan or a compromised device.
  • Profiles by network. Stricter rules on public Wi-Fi, looser ones at home, applied automatically.
  • Central management. For businesses: one console to push rules to every device, instead of configuring each machine by hand.

For a deeper look at locking down your home network, see our guide to how to secure your Wi-Fi.

How do I set up firewall software?

Start with what you already have. Windows, macOS and most Linux distributions ship with a firewall, and your router has one too. The setup below follows the lifecycle NIST recommends: secure the firewall itself, write a policy, then test and review.

Firewall setup in six steps1. Turn on the built-in firewallWindows, macOS, Linux, router2. Update firmware and change default passwordsbefore it goes live3. Set default-deny for inbound trafficallow only what you need4. Close remote admin access from the internetVPN + MFA only5. Turn on logging and review it weeklyalerts on repeats6. Test, back up the config, review rulesevery quarter
Follow the steps in order — a firewall with default passwords or untested rules is a false sense of security. Illustration by Cysoro.
  1. Turn on what is already there. On Windows, check Windows Security > Firewall & network protection. On macOS, System Settings > Network > Firewall. On your router, enable its firewall in the admin panel.
  2. Update and harden the firewall itself. Install the latest firmware, delete or disable default accounts, and change every default password before the device handles production traffic.
  3. Set default-deny inbound. Block all incoming traffic, then add allow rules only for services you actually run, such as a web server on port 443.
  4. Restrict outbound on servers. Servers should only reach the destinations they need. A web server has no business opening connections to random addresses.
  5. Close remote management. Never expose a firewall's admin interface to the internet. Manage it from an internal network or VPN, with multi-factor authentication.
  6. Turn on logging, then read the logs. A firewall nobody monitors is a locked door with no one watching the street. Review blocked attempts weekly and investigate repeats.
Never disable the firewall to test a connectionIf an app cannot connect, add a narrow exception for that app or port instead. Disabling the whole firewall removes every layer of network protection at once.

Common firewall mistakes to avoid

Most firewall failures are configuration failures, not product failures. These are the ones NIST and CISA guidance warns about most often:

  • Allow-all rules. A rule that allows any source, any destination and any port is the same as having no firewall for that traffic.
  • Rules that never expire. Temporary rules added for a project stay forever. Review the rule set quarterly and delete what is no longer needed.
  • No logging. If you never look at blocked traffic, you will miss the scan that precedes an attack — and you will have no evidence after one.
  • Exposed management interfaces. Firewalls and VPN gateways are prime targets; attackers actively scan for their login pages. Keep them off the internet entirely.
  • Unpatched firewalls. Edge devices are among the most exploited systems in recent breach data. Patch firmware as fast as you patch servers.
  • Believing the firewall is enough. CISA is explicit: firewalls primarily protect against malicious traffic, not against malware you install yourself. Pair them with antivirus, updates and phishing-resistant MFA.

Our small business cybersecurity checklist puts firewall rules alongside backups, updates and access control so nothing gets forgotten.

Who needs firewall software?

Everyone with a device connected to the internet, but the form it takes depends on the setup. Home users are covered by the built-in firewall on their operating system plus the one in their router. Remote workers add a host firewall that travels with the laptop and a VPN for untrusted networks.

Small businesses need a managed network firewall at the edge, host firewalls on every endpoint, and someone — in-house or outsourced — who reviews the rules and logs. Regulated businesses add a WAF for public web applications and intrusion prevention, because compliance frameworks expect network segmentation and logged access controls, not just a device in a rack.

If you run a public website, check that your headers and TLS are sound too — our free security headers checker takes seconds.

The bottom line

Firewall software is a simple idea executed well: inspect every connection, allow only what your rules permit, and log the rest. The built-in firewalls in Windows, macOS and Linux already do this competently, and they cost nothing extra.

Turn them on, set default-deny for inbound traffic, close remote management to the internet, and review the rules and logs on a schedule. That discipline — more than any brand — is what keeps the gate closed. You can see what the internet sees of your own connection with our free what is my IP tool.

Frequently asked questions

What is firewall software in simple terms?

Firewall software is a program that acts as a gatekeeper for your device or network. It checks every network connection against a set of rules and lets the legitimate ones through while blocking the rest, such as unsolicited connection attempts from the internet.

Do I need firewall software if I already have antivirus?

Yes. Antivirus looks for malicious files on your device, while a firewall controls network traffic. They do different jobs and work best together. Most operating systems already include a firewall, so for many people the answer is to make sure the built-in one is on, not to buy another.

Is the Windows Firewall good enough?

For most home users and many small businesses, yes. Windows Firewall is a host-based, two-way firewall that blocks unsolicited inbound traffic by default and can filter by application, port and IP address. Microsoft recommends leaving it on even if you run another security product.

What is the difference between a hardware firewall and firewall software?

A hardware firewall is a physical device, often built into a router, that protects a whole network at its boundary. Firewall software runs on an individual device and controls that device's traffic, including which applications may connect. Most networks use both.

Can a firewall stop malware?

Partly. A firewall can block malware from reaching your device over the network and can stop malware that is already installed from sending data out. It cannot stop you from downloading and running a malicious file yourself, which is why it must sit alongside antivirus and safe habits.

What is a next-generation firewall?

A next-generation firewall adds application awareness, intrusion prevention, deep packet inspection and sometimes encrypted-traffic inspection to basic packet filtering. It decides based on what the traffic actually is, not just its addresses and ports.

Should I turn off my firewall to fix a connection problem?

No, not as a first step. Turning it off removes a layer of protection. Instead, check whether a specific rule is blocking the application or port, add a narrow exception for it, and re-test. If you must disable it for a test, turn it back on immediately afterwards.

Does a firewall slow down my internet?

A host-based software firewall has a negligible effect on speed for normal use. A network firewall doing deep packet inspection on a busy connection can add latency, but for home and small-office traffic the difference is usually unnoticeable.

Sources

  1. NIST — SP 800-41 Rev. 1, Guidelines on Firewalls and Firewall Policy
  2. CISA — Understanding Firewalls for Home and Small Office Use
  3. Microsoft Learn — Windows Firewall with Advanced Security
  4. McAfee — What Is a Firewall and How Does It Work?
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against NIST SP 800-41 Rev. 1, CISA firewall guidance and Microsoft Learn documentation for Windows Firewall.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free