Capstone project

Project: publish a service and protect the office

Lesson 20 of 20 · 24 min · Module 6: Put it together

Build the complete firewall configuration for the small company you have worked with through the course.

Start this lesson →

Free. No installation: you write and run the code in your browser, and it is checked automatically.

By the end, you’ll be able to…

  • Combine translation and policy in one configuration
  • Order exceptions, allows and denies deliberately
  • Verify the whole design against its brief

The idea

The capstone uses everything: zones, precise rules, an exception placed above the rule it limits, source and destination NAT, containment of the DMZ, and logging. Remember the order of work: destination NAT, then the policy, then source NAT.

default deny
# 1. NAT lines
# 2. exceptions and denies that must win
# 3. allow rules, grouped by direction
# 4. containment, then the cleanup rule

01Start with the translations

Write the two NAT lines first: the website published on the public address, and the office leaving for the internet with the public source. Then write every policy rule for what the policy sees: the real server, and the original office addresses.

02Order the policy

The kiosk exception goes above the rule that lets the office reach the website. The DMZ containment rule and the cleanup rule go at the end, in that order. Group the rest by direction so the next administrator can read it.

03Prove it against the brief

Go through the brief line by line with the Output tab open. For each requirement, find the test packet, and confirm that the rule you intended is the one that decided it.

Your project brief

Write the configuration. 1. trust may use the internet on tcp 80, 443 and udp 53, leaving with the source address public. 2. The website: public port 443 is forwarded to web port 443 for untrust, and trust reaches web on tcp 443 directly. 3. The kiosk may browse the internet but must not reach the dmz: an explicit deny, logged. 4. admin may use SSH (tcp 22) to the dmz, logged. 5. The dmz may start nothing toward trust: an explicit deny, logged. 6. A logged cleanup rule comes last.

What the checks look for

  • The office and the kiosk use the internet from the public address
  • The website is published on the public address, port 443 only
  • Staff reach the website directly, with their own address, and no other DMZ server
  • A logged rule keeps the kiosk out of the DMZ
  • Administrator SSH to the DMZ is logged, and nobody else has it
  • A logged rule for the DMZ stops it from reaching the office
  • The internet cannot reach the office, and a logged cleanup rule is last
Try it in the editor →

Take this with you

A firewall configuration is translation, ordered policy and logging working together. Build it from a brief, and verify every line of that brief.

Go a little further

Add a guest network 10.0.9.0/24 as a new zone in your head and write down the three lines it would need: internet access, translation, and one deny.

Learn Firewall Foundations for free

20 short lessons with real code and instant checks.

See the whole course →