Firewall Training Lab

Kable Academy ยท Cybersecurity Fundamentals

0 of 8 complete

Lesson 1

What is a Firewall?

Every device on the internet gets a constant stream of traffic. Most of it is stuff you asked for, like web pages and email. Some of it isn't: scans, connection attempts to services you never meant to expose, and malicious downloads. Something has to stand at the border and decide what gets in. That something is a firewall.

โ–ถ Watch the video first (about 9 minutes)

Video: "What is a Firewall? How It Protects Your Network!" by Neurix on YouTube.

Watch a firewall work

Every packet that tries to cross gets checked against the firewall's rules. Allowed packets pass through. Blocked packets get stopped at the wall. Switch to Outbound to see that a firewall also checks traffic leaving your network.

๐ŸŒ The Internet
๐Ÿ  Your Network
๐Ÿ›ก FIREWALL
0 allowed
0 blocked

๐Ÿ’‚ The security guard

Picture a guard at the entrance of a building, holding a list. If you're on the list, you come in. If you're not, you're turned away. A firewall does the same thing for network traffic, thousands of times per second.

โ†”๏ธ It works both ways

A firewall doesn't only watch traffic coming in. It can also control traffic going out. That helps stop a device inside your network from connecting somewhere it shouldn't, for example a PC that's already been infected trying to "phone home" to an attacker.

Two kinds of firewall

๐Ÿ“ฆ

Hardware firewall

A dedicated device, usually at the edge of the network, that protects every device behind it.

๐Ÿ’ป

Software firewall

A program running on one computer (like Windows Defender Firewall) that protects just that device.

Most organizations use both: a hardware firewall at the border and software firewalls on each computer.

โœ… Quick check

Lesson 2

Ports & Traffic

A device can run many services at once: a website, email, remote access. Each one is reached through a numbered port. Think of ports as numbered doors into a device. The port number tells you what kind of traffic it is.

Well-known ports

PortServiceUsed for

What a firewall reads on every packet

Hover over each piece.

Destination address93.184.216.34

Where the packet is going.

Port443

Which door (service) it's aimed at.

ProtocolTCP

How it travels: TCP or UDP.

Source address203.0.113.9

Where it came from.

Example from the video: allow port 443 so people can reach a website, but block port 23 (Telnet), an old remote access service that's considered insecure. Same device, different doors, different decisions.

๐Ÿšช Lab: Lock down the server

Your job: This server hosts your company's public website over HTTPS, and that's all it does. Right now every door is open. Start the traffic, watch what gets in, then click the doors to close the ones the website doesn't need. When you think you've got it, click Check my server.
๐ŸŒ Incoming traffic
๐Ÿ–ฅ Web Server ยท click a door to open/close
0 customers served
0 customers turned away
0 attacks stopped
0 attacks that got in
Close doors by clicking them. Purple packets are attacks.
Key principle: every open door is a potential way in. A good firewall keeps every port closed that isn't actually needed and leaves open only the few that are.

Lesson 3

How Firewall Rules Work

A firewall holds a list of rules and reads them in order, top to bottom. When a packet arrives, it's compared against each rule one at a time. As soon as a rule matches, the firewall does what that rule says and stops checking. The first match wins.

The parts of a rule

ActionALLOW
From (source)Internet
To (destination)Web Server
Port443

Reads as: "Allow traffic from the Internet to the Web Server on port 443."

The most important rule: Deny All

A well-configured firewall ends with a final rule: Deny All. Anything that wasn't explicitly allowed gets blocked automatically. You can't list every bad thing on the internet, so you start closed and open only exactly what you need.

๐Ÿงช Rules Lab

#ActionFromToPort

โž• Add a rule (it's added just above Deny All)

๐Ÿ“ฆ Send a test packet

Watch the highlight walk down the rule list. The first rule that matches decides what happens.
    Try this: uncheck Deny All and send a packet that no rule matches. Without that last rule the packet just slips through. That's why "deny by default" matters.

    Lesson 4

    Packet Filtering vs Stateful

    Not all firewalls are equally smart. A packet filter looks at each packet on its own and has no memory; every packet is a stranger. A stateful firewall remembers the conversations you started in a connection table, so it can tell a real reply from a fake one.

    ๐Ÿ”ฌ Lab: Spot the fake reply

    Run steps 1, 2, and 3 in Packet Filter mode, then switch to Stateful mode and run them again. Watch what happens to the attacker's fake reply in step 3.
    ๐ŸŒ The Internet
    ๐Ÿ  Your Network
    ๐ŸŒ
    Website93.184.216.34
    ๐Ÿฆน
    Attacker203.0.113.66
    ๐Ÿ›ก
    Firewallpacket filter
    ๐Ÿ’ป
    Your Laptop192.168.1.20

    Firewall rules

      Connection (state) table

      A packet filter has no table. It forgets every packet as soon as it passes.

      What happened

      A stateful firewall doesn't need a separate rule for every reply, because it remembers the state of each connection. That's where the name comes from. A packet that shows up claiming to be a reply to something you never sent finds no match in the table and gets blocked.

      Lesson 5

      Next-Generation Firewalls (NGFW)

      A stateful firewall checks addresses, ports, and connections, but it mostly looks at the outside of each packet. Attackers know port 443 is almost always open, so they hide malicious content inside that "normal" web traffic. A next-generation firewall looks inside.

      ๐Ÿ”Ž

      Inspects content

      Looks at what's actually in the traffic, not just the address and port.

      ๐Ÿท๏ธ

      Identifies applications

      Knows which app the traffic really belongs to, even on a common port.

      ๐Ÿฆ 

      Catches attacks

      Scans for known attack patterns and malware, and can enforce detailed rules like "allow this site but block its file sharing."

      ๐ŸŽฌ Demo: same port, different contents

      Every packet below uses port 443, which is allowed. Send the traffic through a stateful firewall first, then through an NGFW.

      ๐ŸŒ The Internet
      ๐Ÿ  Your Network
      ๐Ÿ›ก STATEFUL
      0 good traffic delivered
      0 threats caught
      0 threats that got in

      ๐ŸŽฎ You are the NGFW

      Every packet is on port 443. A basic firewall would wave them all through. Inspect the contents and decide.

      Lesson 6

      The Limits of a Firewall

      A firewall is essential, but it's one layer of defense, not a complete solution. Here are four things it can't fix on its own.

      ๐ŸŽฃ

      1. It can't stop a user from being tricked

      If someone gets a convincing message and types their password into a fake site, the firewall just sees normal, allowed web traffic. The attack went through the person, not an open port.

      ๐Ÿ”

      2. Encrypted traffic is a challenge

      Encryption is good for privacy, but a firewall often can't see inside it without extra setup, and attackers can hide inside that encryption.

      ๐Ÿ 

      3. It mostly guards the border

      A threat already inside, like an infected device or a malicious insider, can often act within the network without ever crossing the firewall.

      โš™๏ธ

      4. It's only as good as its rules

      One careless rule, like leaving a port wide open, can quietly undo much of its protection. Many real breaches come down to simple misconfiguration.

      ๐Ÿง… Layered defense

      Informed users
      Up-to-date software
      Strong authentication
      Firewall
      ๐Ÿ—„ Your data

      A firewall works best alongside other protections: strong authentication, up-to-date software, and users who know how to spot a scam. No single tool protects everything.

      Keep the firewall healthy too: review the rules, close unused ports, and keep it updated. A poorly configured firewall gives a false sense of security.

      โœ… Can the firewall stop it?

      Lesson 7

      Recap

      • A firewall is a barrier between networks. It inspects traffic and decides what to allow and what to block, based on a set of rules.
      • It makes those decisions using information on each packet, like addresses, ports, and protocol.
      • Rules are read top to bottom and the first match wins.
      • The safest approach is deny by default: block everything, then allow only what's actually needed.
      • Firewalls range from simple packet filters, to stateful firewalls that track connections, to next-generation firewalls that inspect the actual content of traffic.
      • A firewall is one layer of defense. It can't stop a user from being tricked, and it's only as good as its configuration.

      Key terms

      Firewall: hardware or software that filters traffic between networks using rules.
      Packet: a small chunk of data traveling across a network, labeled with addresses and a port.
      Port: a numbered "door" that leads to a specific service on a device (443 = HTTPS).
      Protocol: the method a packet uses to travel, such as TCP or UDP.
      Rule: an instruction made of source, destination, port, and an action (allow or deny).
      First match wins: the first rule that matches a packet decides its fate, and checking stops.
      Deny All / default deny: the final rule that blocks anything not explicitly allowed.
      Packet filter: a firewall that checks each packet on its own, with no memory.
      Stateful firewall: a firewall that tracks connections in a table and allows matching replies.
      NGFW: a next-generation firewall that also inspects content, identifies apps, and blocks known attacks.
      Layered defense: using several protections together so one failure doesn't expose everything.
      Misconfiguration: a mistake in the rules, such as an unneeded open port, that weakens protection.

      Final

      Final Quiz

      20 questions covering the whole lab. You need 70% to pass. When you submit, you'll get a results page to print or save as a PDF and hand in to your instructor.

      Instructor tools: verify a results code

      Enter the details exactly as they appear on the student's results page. A matching code means the name, score, and date haven't been edited.

      The expected code will appear here.