Firewall Types and Function
What a firewall does: filters network traffic based on rules — allows or blocks packets based on source/destination IP, port, protocol, and direction (inbound/outbound). Creates a boundary between trusted and untrusted networks. At minimum, blocks unsolicited inbound connections from the internet.
Hardware firewall: a dedicated network device (or feature on a router) that protects all devices on a network. Home routers include a basic NAT firewall — blocks all unsolicited inbound connections from the internet by default. Enterprise firewalls (Cisco ASA, Palo Alto, Fortinet) provide advanced features: stateful inspection, application filtering, IPS, VPN.
Software firewall: installed on an individual computer — protects that device regardless of network. Windows Defender Firewall: built into all modern Windows versions. Protects against attacks originating from the local network or internet. Can be configured per-application and per-network-profile.
Stateful vs stateless: stateful firewall tracks connection state — knows if inbound traffic is a response to an outbound request (allows it) or an unsolicited inbound attempt (blocks it). More intelligent and the standard for modern firewalls. Stateless: evaluates each packet independently based on rules only — older, simpler ACL-based approach.
Windows Defender Firewall Configuration
Accessing Windows Defender Firewall: Control Panel → Windows Defender Firewall, or Settings → Privacy & Security → Windows Security → Firewall & network protection. Three profiles: Domain (connected to domain), Private (home/trusted networks), Public (coffee shops, airports — strictest rules).
Allow an app through firewall: Windows Defender Firewall → Allow an app or feature through Windows Defender Firewall → Change settings → Find the app or click Allow another app → browse to executable. Can specify Domain, Private, or Public profiles separately. Applications often prompt automatically when they first attempt to use the network.
Advanced settings: Windows Defender Firewall with Advanced Security (wf.msc) — create custom inbound and outbound rules by port, protocol, program, service. Example: allow port 3389 TCP inbound for Remote Desktop. Rules can specify remote IP addresses to limit access further.
Troubleshooting firewall issues: if an application works on one PC but not another — check firewall rules on the failing PC. Temporarily disable Windows Defender Firewall to test if it's causing the issue (never leave disabled in production — re-enable immediately after testing). Check event logs (Windows Defender Firewall drops are logged in Event Viewer → Windows Logs → Security).