Sub topic 15
Firewalls and SOHO Router Hardening
This chapter assumes you know what an IP address, a port, and a router are, and that you can open a PowerShell prompt in Windows. It covers how firewalls filter traffic and which settings to change on a small office or home office (SOHO) router.
How a Firewall Decides
A firewall is a control that allows or blocks network traffic based on rules. Each rule matches on direction (inbound or outbound), protocol, port, and sometimes address or program. Rules are checked in order, and most firewalls end with an implicit deny. That means traffic is blocked unless a rule allows it.
| Type | Where it runs | Example |
|---|---|---|
| Host-based | On one computer | Windows Defender Firewall |
| Network-based | At the network edge | SOHO router, dedicated appliance |
A stateful firewall tracks connections. It allows a reply because it remembers that an inside host started the conversation. A stateless filter judges each packet alone.
Windows Defender Firewall
Windows Defender Firewall has separate profiles for Domain, Private, and Public networks. Public is the strictest. The exam expects you to close services that send data in clear text. Telnet on TCP port 23 is the usual example. This command blocks inbound Telnet:
New-NetFirewallRule -DisplayName "Block inbound Telnet" -Direction Inbound -Protocol TCP -LocalPort 23 -Action BlockRun it from an elevated prompt. Block rules take precedence over allow rules in Windows Defender Firewall.
Hardening a SOHO Router
Routers ship with known defaults, so attackers try them first. Work through these steps:
- Change the default administrator username and password to a strong, unique one.
- Update the firmware, because old firmware contains known vulnerabilities.
- Disable remote administration from the internet, or limit it to a trusted address.
- Use WPA3, or WPA2 with AES, for Wi-Fi. Never use WEP or an open network.
- Disable WPS (Wi-Fi Protected Setup), because its PIN method can be brute forced.
- Turn off UPnP (Universal Plug and Play) if you do not need it, since it lets programs open ports without approval.
- Disable unused services and physical ports.
- Change the default SSID. Hiding it gives little real protection.
- Use MAC filtering only as a minor extra layer, because MAC addresses can be copied.
Port forwarding sends outside traffic on a chosen port to one inside device. Forward only ports you need, and remove rules you no longer use. A screened subnet (formerly called a DMZ) places public-facing servers in a separate zone, so a compromise there does not expose the internal network.
Content Filtering
Content filtering blocks sites by category, address, or keyword. Many SOHO routers can do this. It reduces exposure to malicious sites and enforces acceptable use.
Process Flow
Common Mistakes
- Opening a port "temporarily" and forgetting to close it.
- Treating a hidden SSID as security.
- Leaving UPnP and WPS on because they are convenient.
Exercise
A technician sets up a new SOHO router. Name three changes that harden it before users connect.
Show answer
Any three of these: change the default admin credentials, update the firmware, disable remote administration, use WPA3 or WPA2 with AES, disable WPS, disable UPnP, or remove unneeded port forwarding.
Exercise
A Windows PC must stop accepting inbound connections on TCP port 23. Which tool and rule type do you use?
Show answer
Use Windows Defender Firewall, for example with New-NetFirewallRule. Create an inbound rule for TCP local port 23 with the action Block.