Two rules that disagree
Rule one says: allow the web. Rule two says: block everything from the internet.
A visitor asks for the web server. Which rule wins? The answer depends on one thing: the order.
By the end of this lesson
Note
I can set the order of allow and block rules so traffic is handled as I want.
Key words
| Word | What it means | Example |
|---|---|---|
| Firewall | a device or program that allows or blocks traffic | |
| Rule | one instruction that says allow or block | |
| Allow | let the traffic through | |
| Block | stop the traffic | |
| Precedence | which rule is used first when two match | |
| Port | a numbered door on a computer for one service | 80 is the web |
| Default deny | block anything no rule allows |
The cells students fill in are left blank in this preview.
Starter
Have a go
Starter
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
The first matching rule wins
A firewall reads its rules from the top. It stops at the first rule that matches the traffic.
It does not read the rest. So precedence is the order of the list. A rule higher up beats a rule lower down.
Worked example: web traffic on port 80
| Order | Rule | Result for traffic on port 80 |
|---|---|---|
| 1 | ALLOW port 80 | Matches. Allowed. Stop reading. |
| 2 | BLOCK everything | Never reached for port 80 |
The cells students fill in are left blank in this preview.
Swap the order and it breaks
| Order | Rule | Result for traffic on port 80 |
|---|---|---|
| 1 | BLOCK everything | Matches. Blocked. Stop reading. |
| 2 | ALLOW port 80 | Never reached, so the web is blocked |
The cells students fill in are left blank in this preview.
Check
Have a go
Check
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.