Computer Science Grade 10 20 min

4. Firewalls: Protecting Networks from Unauthorized Access

Learn about firewalls and how they protect networks from unauthorized access.

Tutorial Preview

1

Introduction & Learning Objectives

Learning Objectives Define what a firewall is and explain its role as a network's first line of defense. Differentiate between hardware and software firewalls, and stateful vs. stateless inspection. Interpret a basic Access Control List (ACL) to determine if a data packet will be allowed or denied. Analyze the importance of rule order and the 'implicit deny' principle in a firewall's configuration. Explain how firewalls use IP addresses, port numbers, and protocols to filter traffic. Identify the limitations of a firewall and recognize that it is one component of a larger security strategy. Imagine your school is a castle. How do you stop uninvited guests from wandering the halls? 🏰 A firewall is the digital gatekeeper for your computer network. In this...
2

Key Concepts & Vocabulary

TermDefinitionExample FirewallA network security device, either hardware or software, that monitors incoming and outgoing network traffic and decides whether to allow or block specific traffic based on a defined set of security rules.The router you get from your internet provider has a built-in hardware firewall that protects your laptop and phone from random connection attempts from the internet. Data PacketA small unit of data sent over a network. Each packet contains a header with information like the source and destination IP address, port number, and the protocol being used.When you load a webpage, the text and images are broken down into many small packets. The firewall inspects the header of each packet before it reaches your computer. IP AddressA unique numerical label assigned to...
3

Core Syntax & Patterns

Packet Filtering Logic IF (packet_matches_rule) THEN (perform_action) ELSE (check_next_rule) This is the fundamental logic of a firewall. For every incoming or outgoing packet, the firewall compares its header information (source/destination IP, port, protocol) against its rule list, one rule at a time, from top to bottom. Rule Order Precedence Rules are processed sequentially from top to bottom. The first rule that matches the packet is applied, and processing stops. The order of your firewall rules is critical. A specific 'deny' rule must be placed before a general 'allow' rule, otherwise the general rule will match first and the specific traffic you wanted to block will be allowed. The Implicit Deny Principle IF (packet_does_not_match_any_rule) T...

4 more steps in this tutorial

Sign up free to access the complete tutorial with worked examples and practice.

Sign Up Free to Continue

Sample Practice Questions

Challenging
You need to configure a firewall for a server at `198.51.100.10`. The policy is: - Allow secure web traffic (port 443) from ANYONE. - Allow remote admin access (port 22) ONLY from the admin's IP `203.0.113.50`. - Block all other traffic. Which ACL (processed top-to-bottom) correctly implements this policy?
A.1. ALLOW ANY to 198.51.100.10 port 443 2. ALLOW ANY to 198.51.100.10 port 22
B.1. ALLOW 203.0.113.50 to 198.51.100.10 port 22 2. ALLOW ANY to 198.51.100.10 port 443
C.1. DENY ANY to 198.51.100.10 port 22 2. ALLOW ANY to 198.51.100.10 port 443 3. ALLOW 203.0.113.50 to 198.51.100.10 port 22
D.1. ALLOW ANY to 198.51.100.10 port 443 2. ALLOW 203.0.113.50 to 198.51.100.10 port 22 3. DENY ANY to 198.51.100.10 port ANY
Challenging
A firewall's ACL is: 1. ALLOW TCP from ANY to 192.168.1.10 port 80 2. DENY TCP from 10.10.10.5 to ANY port ANY An administrator wants to block `10.10.10.5` from accessing the web server at `192.168.1.10`. Why is this configuration flawed?
A.The DENY rule uses an incorrect port number.
B.The ALLOW rule is too broad and should specify a source IP.
C.The rules are out of order; a packet from 10.10.10.5 to port 80 will match Rule #1 and be allowed.
D.stateful firewall is required to block a specific IP address.
Challenging
A stateful firewall observes a TCP handshake initiated from an internal client to an external server. It records the connection in its state table. When a packet arrives from the external server, what information in the state table is most critical for validating this packet as a legitimate response?
A.The server's MAC address.
B.The packet's Time-to-Live (TTL) value.
C.The combination of source/destination IPs and ports, plus the TCP sequence numbers.
D.The size of the data payload in the packet.

Want to practice and check your answers?

Sign up to access all questions with instant feedback, explanations, and progress tracking.

Start Practicing Free

More from IV. Network Security: Protecting Data in a Connected World

Ready to find your learning gaps?

Take a free diagnostic test and get a personalized learning plan in minutes.