AP Cybersecurity · Study guide

Firewall Placement

AP® Cybersecurity · Unit 3 · Network Security, Firewalls & Detection

Firewall Placement

Where firewalls belong in a network: at every segment, at every connection to the internet, each set to the security its segment needs.

1Why placement matters

A firewall only controls traffic that passes through it. A perfectly configured firewall in the wrong place protects nothing, and a single missed connection to the internet can let attackers walk around every other defense. Placement follows three rules.

Figure 1. Every place traffic enters or leaves the internal network has a firewall (both internet links), and every segment has its own firewall set to the strictness its contents need.

2A firewall for every segment

Each segment of a network should have a firewall to control the flow of data into and out of that segment. That is what turns segmentation into real protection: without a firewall at the boundary, a “segment” is only a label, and traffic flows freely between segments.

3Different strictness for different segments

Segments have different security needs based on the data and services inside them, and the level of security for each firewall can be set independently:

SegmentWhat it holdsFirewall strictness
Screened subnet (DMZ)Public website, email serverAllows the public in, but only to specific services (e.g., web traffic on port 443)
Staff networkTeacher and office computersMedium: internet access and the services staff use; nothing unsolicited from outside
Records serversStudent or patient recordsStrict: only specific internal systems may connect, on specific ports
Guest Wi-FiVisitors' devicesInternet only; no access to any internal segment

4Every entry and exit point

Each point where data enters or leaves (ingress and egress) between the internal network and the public internet should have a firewall. Organizations often have more connections than they realize: a backup internet line, a cellular hotspot in the server room, a separate line for the building's security cameras, a remote site connected over the internet. An attacker needs only one unguarded path.

The key idea

Put a firewall at every segment boundary and at every connection to the internet, and set each one's rules to match what its segment holds.

5Worked examples

Worked Example 1 Place the firewalls

The school network

A school has one internet connection, a public website server, a staff network, a student network, and a server holding grades. Where should firewalls go?

  1. 1
    At the internet connection: an edge firewall controlling everything entering or leaving.
  2. 2
    Around the public website: a screened subnet, with a firewall separating it from the internal network.
  3. 3
    At each internal segment: staff, student, and grades, each with its own firewall.
  4. 4
    Set strictness by contents: the grades segment strictest, the student segment preventing access to staff and grades.
Answer: Edge firewall, DMZ firewall, and a firewall per segment, each with its own rules.
Worked Example 2 Find the gap

The forgotten backup line

A hospital's main internet connection has a firewall. During an audit, IT discovers a backup internet line installed years ago for emergencies, connected directly to the internal network with no firewall. Why is this serious?

  1. 1
    Every point of ingress and egress to the internet needs a firewall.
  2. 2
    The backup line is a second door into the internal network, with no one checking traffic through it.
  3. 3
    An attacker who finds it bypasses the main firewall entirely.
Answer: It is an unguarded path to the internet. Add a firewall on the backup line with the same (or stricter) rules as the main one.
Worked Example 3 Independent strictness

One rule set for all?

An IT administrator proposes copying the same firewall rules to every segment to keep things simple. What is the problem?

  1. 1
    Segments hold different data and services: guest Wi-Fi, staff computers, and a records server have very different needs.
  2. 2
    Rules loose enough for staff would be too loose for the records segment.
  3. 3
    Rules strict enough for records would block normal staff work.
Answer: Firewall security levels should be set independently per segment, based on what each segment holds.
Worked Example 4 Segment without a firewall

The segment that wasn't

A company created separate subnets for its finance team and everyone else, but did not put a firewall between them. A sales laptop gets malware. Is finance protected?

  1. 1
    Subnets separate addresses, but traffic between them goes through the router without filtering.
  2. 2
    Without a firewall at the finance segment's boundary, the malware can reach finance computers.
  3. 3
    Each segment should have a firewall controlling data in and out.
Answer: No. Segmentation without a firewall at the boundary does not control traffic between segments.

6Common mistakes

Common Mistake 1 · One firewall at the front door only

An edge firewall alone leaves internal segments open to each other. Each segment needs its own.

Common Mistake 2 · Forgetting secondary internet connections

Backup lines, hotspots, and separate camera or vendor connections are all ingress and egress points. Each needs a firewall.

Common Mistake 3 · Identical rules everywhere

Set each firewall's strictness to the data and services in its segment.

Justify a placement like this

“A firewall should be placed between the records segment and the rest of the internal network, with strict rules allowing only the specific systems that need records access. Because this segment holds the most sensitive data, its firewall should be stricter than the one protecting the staff segment.”

Say where the firewall goes, what traffic it controls, and how strict it should be given what the segment holds.