Skip to main content
PSUT / IoTEngineering learning studio
WORKSPACE
Offline-first portalDr. Mohammad Alja’afreh
Connected Networks StudioNetworking and CommunicationExperimentsWorkspaces
ENGINEERING WORKSPACE
Home / Advanced Cybersecurity Range / S02 · Network segmentation & default deny
IoTPSUT IoT Engineering StudioPrincess Sumaya University for Technology · Dr. Mohammad Alja’afreh
Advanced Cybersecurity Range · V16.9
IoT Security and Privacy

S02 · Network segmentation & default deny

Ask Dr. Mohammad · S02 →

Evaluate necessary and prohibited communication flows in a fixed IoT topology.

Design experiment & verify evidence →
S02 · Laboratory mentorAsk about the current experiment, its algorithms or Python notebook.
Ask Dr. MohammadAdaptive practice
Learning workflow · Advanced cybersecurityS02 · Network segmentation & default deny

Related course access: Networking and Communication — same laboratory, notebook and completion record.

S02 · Academic orientation

Scope and objectives

Scope of the experiment

Evaluate necessary and prohibited communication flows in a fixed IoT topology.

The focus of this experiment is to trace network segmentation and ordered default-deny decisions. Students then evaluate allowed and denied communication paths, and verify least-privilege policy and document necessary exceptions. The Concepts view explains the operation before the practical work; the Simulation view is used to examine reference and changed inputs, not to substitute for actual measurements.

Learning objectives

  • Trace network segmentation and ordered default-deny decisions.
  • Evaluate allowed and denied communication paths.
  • Verify least-privilege policy and document necessary exceptions.
  • Identify the configured inputs (Enforce allowlist (0=no, 1=yes)) and record the corresponding observed outputs with units where applicable.
  • Compare the reference calculation or decision with an independent implementation or authorized observation; state any discrepancy and the applicable model boundary.

Expected learning outcomes

On completion, students can trace network segmentation and ordered default-deny decisions, evaluate allowed and denied communication paths, and verify least-privilege policy and document necessary exceptions.

Required deliverables

Submit the derivation or state trace for the named operation, the exact reference and changed configurations, the associated simulator or practical evidence, and a short validation statement addressing verify least-privilege policy and document necessary exceptions. Separate predicted values from observations.

Prerequisite knowledge and related learning

Review the following catalogue prerequisites before starting. After completion, continue to MQTT topic authorization & least privilege.

Environment and experimental methodology

The specified isolated laboratory environment, with local synthetic inputs and authorized services only. Use the experiment-specific setup and verification instructions.

Begin with a manual prediction, record the baseline, change one independent condition at a time, and compare the resulting trace or measurements with the original prediction. Record observations and uncertainty separately from reference values. Follow the experiment’s specific procedure, safety limits, and acceptance checks.

S02 · learning outcome

Understand the experiment

Scientific architecture · Network segmentation & default deny

Network default deny — Source zone / IoT; Destination zone / service; Rule matches? / protocol and port; Permit / explicit authorized flow; Deny / log unmatched flow
Scientific concept map: Source zone — Device / user; Firewall rule — Allowed flow; Default deny — No matching rule; Destination zone — Broker / admin; Verification — Allow and deny controls.

Scientific foundations and analytical reasoning

Default-deny segmentation allows only explicitly required flows. Reachability and application authentication are distinct.

Before operating the equipment or executing the program, derive the expected outcome using the required theoretical work in Experiment. Use the diagram to identify the variables and system boundaries.

Scientific theory · Segmentation and explicit flows

Network segmentation reduces permitted communication paths across trust zones. Default-deny requires an explicit allow rule for necessary flows; rules should define source, destination, protocol and port. A successful network connection does not imply application authorization. Stateful response handling differs from allowing all reverse traffic.

Worked example and engineering interpretation

A sensor zone may need to reach its broker but not the administration service. Test the required path and a prohibited path in the lab topology. If both are reachable, review rule order and default policy rather than assuming segmentation is effective.

Engineering principles · additional worked teaching example

Segmentation separates device groups using network policy; default deny permits only explicit flows. Rule evaluation order matters. If rule permits device→broker TCP8883 and default denies others, device→database is blocked unless explicitly allowed.

From theory to experiment

Predict the reference result before operating the workbench; check the actual intermediate state, units and constraints. The existing simulation, implementation and procedure below are distinct sources of evidence.

How to investigate Network segmentation & default deny

Evaluate necessary and prohibited communication flows in a fixed IoT topology.

Analytical investigation means collecting an observation, identifying the mechanism, using a calculation or state trace to explain it, and checking your conclusion against evidence. Controlled comparison means changing one independent variable, holding the remaining relevant conditions constant, and measuring a dependent variable against a baseline. Experimental validation means comparing a predicted result to a reproducible observation or assertion; agreement inside a model does not certify hardware. Evidence-based reasoning connects a specific observation to a theoretical rule and states uncertainty, not merely an opinion. Performance characterization records a named metric and its units across conditions; sensitivity analysis changes one parameter across several values. A threat assessment links an asset, threat, consequence and evidence to a mitigation.

Experiment-specific guided practice

Objective: Evaluate necessary and prohibited communication flows in a fixed IoT topology.

  1. Set Enforce allowlist (0=no, 1=yes) = 1. Observe the calculated results and trace.
  2. Change Enforce allowlist (0=no, 1=yes) = 0. The allowlist permits four essential flows and blocks four forbidden flows.
  3. Restore the reference values. Draw sensor→gateway→broker→dashboard and identify the management zone. Explain why a deny rule is not a real firewall test.

Reference check:

Model boundary:

Independent task and submission evidence

2. Change Enforce allowlist (0=no, 1=yes) = 0. The allowlist permits four essential flows and blocks four forbidden flows. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat.

Before execution write the independent variable and its levels, dependent observation with units where applicable, baseline, controlled variables, measurement method and expected result. For a state machine use state/event/output rather than inventing a numeric metric. Record failures and repeat the baseline. A weak conclusion is “it works”; a supported conclusion names the changed setting, observed value/state, corresponding rule and one limitation.

TrialChanged settingFixed settingsPredicted resultActual observation / unitsEvidence / uncertainty
A: baselineReferenceRecordPredictRecordRecord
B: one changeRecordSame as APredictRecordRecord
A: repeatRestoreSame as APredictRecordRecord

Completion: submit the filled table, relevant simulator screenshot or terminal/notebook output, reasoning with units/assumptions, and one limitation. Preserve the independent assessment questions; this guide does not fill their answers.

Evaluate necessary and prohibited communication flows in a fixed IoT topology.

Method: Enumerate 8 directed flow requests against an allowlist; compare essential and forbidden requests. No packets are sent.

Prerequisites: S01.

Closed teaching fixture only. No external devices, sockets, scanning, exploits or real credentials. Browser decisions are not measurements of deployed controls.

Worked engineering reasoning and boundary conditions

Engineering reference configuration: Enforce allowlist (0=no, 1=yes) = 1. In the classroom model, Allowed = 4; Denied = 4; Unauthorized allowed = 0. This is a fixed flow-policy matrix, not firewall execution or a routing measurement. Enumerate 8 directed flow requests against an allowlist; compare essential and forbidden requests. No packets are sent.

Use the diagram to follow the calculation or state progression. Keep the teaching configuration separate from the independent exercise values; compare observations with the actual model and implementation.

Concept animation · matrix and row processing

Explore the teaching example independently of the simulator. Each step reveals an operation, data relationship or calculated state. The Simulation view has separate editable inputs.

Network segmentation & default deny: matrix and row processingExpected allowActual allowSensor → gateway : t…ALLOWALLOWGateway → broker : p…ALLOWALLOWDashboard → broker :…ALLOWALLOWAdmin → gateway : ma…ALLOWALLOWSensor → admin : man…DENYDENYDashboard → sensor :…DENYDENYGuest → broker : pub…DENYDENYSensor → sensor : ma…DENYDENY

Step 1 of 7 · Row 1

Row 1

Sensor → gateway : telemetry
["ALLOW", "ALLOW"]

Teaching example only; inspect live calculations or real practical evidence separately.

Recall the concept before revealing its explanation.

0 / 3 revealed
S02 · 01 / 08Which flows are evaluated in the segmentation experiment?Reveal explanation
Engineering explanation

Evaluate necessary and prohibited communication flows in a fixed IoT topology.

S02 · 02 / 08How does the model represent a segmentation policy?Reveal explanation
Engineering explanation

Enumerate 8 directed flow requests against an allowlist; compare essential and forbidden requests. No packets are sent.

S02 · 03 / 08How many essential and forbidden flows should the strict policy handle?Reveal explanation
Engineering explanation

The allowlist permits four essential flows and blocks four forbidden flows.

S02 · 04 / 08What is the principle of default deny?Reveal explanation
Engineering reasoning

Reject flows unless explicitly permitted by the intended policy.

S02 · 05 / 08Why check permitted and prohibited flows?Reveal explanation
Engineering reasoning

A policy that blocks everything may look secure but break required functionality; verify both acceptance and rejection.

S02 · 06 / 08Network segmentation uses default deny. Select every technically valid statement. A. Explicitly permit required flows. B. Test prohibited flows with negative controls. C. Default deny means all unspecified flows are accepted. D. Segmentation alone authenticates every payload.Reveal explanation
Applied scenario

Correct: A. Explicitly permit required flows.; B. Test prohibited flows with negative controls.

S02 · 07 / 08In Network segmentation & default deny, which reference and changed settings are prescribed for Enforce allowlist (0=no, 1=yes)?Reveal explanation
Controlled configuration

Enforce allowlist (0=no, 1=yes): 1 → 0; hold the remaining settings fixed.

S02 · 08 / 08What expected result distinguishes the reference and changed trials in Network segmentation & default deny?Reveal explanation
Expected observation

The allowlist permits four essential flows and blocks four forbidden flows.

Interactive networking and security instrument

Loading experiment-specific apparatus…
Previous model / additional reference tools
Simulation task

Evaluate necessary and prohibited communication flows in a fixed IoT topology.

Explore the model using its own controls. Record a prediction before changing a condition. Compare the reference with a changed condition, then use the Experiment tab for the procedure, acceptance criteria and notebook. Model outputs and physical observations must remain separate.

Interactive engineering workbenchS02 · Existing model
Defensive workbench

Predict, configure and observe

Decision and event trace

S02 · Model-linked instrumentation

Visual observation lens

Back to controls ↑

Readout from the original computational model; not physical measurements.

Loading instrument…

Awaiting model display.

Experimental instrumentation · A/B

Compare two model conditions

Capture a baseline, change one experimental condition, run the model if required and capture the comparison. Snapshots contain visible controls and display text, not physical sensor readings. Review before exporting.

Open simulation view
Baseline A
Not captured
Comparison B
Not captured

Capture a baseline to begin.

Evidence portfolio →
V19.0 · Contextual AI workspace

Ask your engineering assistants

S02 · current context

Ask Dr. Mohammad locally, or prepare an experiment-aware prompt for ChatGPT, Gemini or Claude. The external providers open in their own tabs; nothing is automatically submitted.

Dr. Mohammad · offline
Dr. Mohammad

Offline curriculum-grounded assistance.

Open local tutor
Network segmentation & default deny

Public course objective, displayed commands, source excerpts and procedure. Private assessment content is not collected.

Prepare a contextual AI prompt

0 characters

Common secret and email patterns are redacted on preparation; this is not a comprehensive privacy filter. Review the entire editable prompt, including student work and unpublished research, before sharing. The providers apply their own accounts, privacy settings and limits.

Prepare → review → copy & open your selected provider → paste and submit there.

Independent theoretical exercises

Before the simulation or practical, solve both experiment-specific tasks. List the given inputs, show the intermediate calculation or state trace, identify the expected observation, and state a limitation. Show formulas and intermediate calculations where relevant, or draw the requested state/sequence diagram. These are independent classroom fixtures; where they differ from the reference configuration below, do not treat them as measured values. Compare your predictions with the corresponding experiment afterwards.

01 · Predict and derive using the given inputs

Draw sensor, gateway, broker and dashboard zones; construct an allowlist for required directed flows using the lab policy.

02 · Compare or justify using evidence

Evaluate a sensor-to-dashboard direct flow and a gateway-to-broker permitted flow; explain evidence needed to distinguish blocked network and denied application.

03 · Policy tracing

Policy tracing · Independent work

Given allow sensor→broker:8883 and gateway→db:5432, default deny, classify sensor→db:5432, sensor→broker:8883, gateway→db:5432.

Work is saved locally when browser storage is available. Export it for submission; no remote upload or automatic grade is assigned.

Expanded independent theoretical exercise bank

Progress from calculation and interpretation to diagnosis and controlled engineering design. Complete the questions without opening the simulation first; show intermediate steps.

Intermediate · Explain a changed-input result

Independent theoretical exercise · S02-01

Use the reference configuration (Enforce allowlist (0=no, 1=yes) = 1), but change Enforce allowlist (0=no, 1=yes) = 0. The model reports Allowed = 8. Explain the governing rule and assumptions that make this output plausible; identify an independent verification method.

Intermediate · Quantitative comparison

Independent theoretical exercise · S02-02

Two model observations of Allowed are 4 (reference) and 8 (changed condition). Compute signed change and, when the reference is nonzero, percentage change. Explain why units matter.

Intermediate · Interpret a technical trace

Independent theoretical exercise · S02-03

For Enforce allowlist (0=no, 1=yes) = 0, the model supplies this excerpt from Calculated trace: Item | Value | Explanation Sensor → gateway : telemetry | ALLOW · expected allow | — Gateway → broker : publish | ALLOW · expected allow | — Dashboard → broker : read | ALLOW · expected allow | — Admin → gateway : management | ALLOW · expected allow | — Sensor → admin : management | ALLOW · expected deny | — Count rows whose Value value is exactly “ALLOW · expected allow”, and identify the displayed row numbers. Explain what the count describes.

Advanced · Reverse reasoning

Independent theoretical exercise · S02-04

An observation is Allowed = 8. Candidate A uses Enforce allowlist (0=no, 1=yes) = 1. Candidate B changes the listed settings (Enforce allowlist (0=no, 1=yes) = 0) and keeps the remaining settings fixed. Which is consistent with the observation? If both can explain it, say what additional evidence is required.

Advanced · Diagnose a reported mismatch

Independent theoretical exercise · S02-05

A student configures Enforce allowlist (0=no, 1=yes) = 0 while preserving all other reference settings, but copies the reference report of Allowed = 4. Evaluate whether the report is justified. Identify the first configuration/output check to perform.

Challenging · Design a controlled verification

Independent theoretical exercise · S02-06

Design a controlled comparison for Network segmentation & default deny using reference Enforce allowlist (0=no, 1=yes) = 1 and test Enforce allowlist (0=no, 1=yes) = 0. Specify the changed setting(s), measured metric Allowed, controls, repetitions, an acceptance check and what evidence can distinguish an actual implementation from the model.

Step-by-step experimental procedure

Evaluate necessary and prohibited communication flows in a fixed IoT topology.

1 · Reference workbench configuration

Use the named reference workbench and its reference inputs. Additional live instruments may have different controls; use the matching instrument. Record virtual and practical results separately.

Enforce allowlist (0=no, 1=yes)1

2 · Perform the investigation in order

  1. Set Enforce allowlist (0=no, 1=yes) = 1. Observe the calculated results and trace.
  2. Change Enforce allowlist (0=no, 1=yes) = 0. The allowlist permits four essential flows and blocks four forbidden flows.
  3. Restore the reference values. Draw sensor→gateway→broker→dashboard and identify the management zone. Explain why a deny rule is not a real firewall test.

3 · Compare controlled trials

TrialIndependent changeExpected checkObservation
ReferenceUse reference inputs aboveThe allowlist permits four essential flows and blocks four forbidden flows.Record actual result
Controlled changeEnforce allowlist (0=no, 1=yes) = 0The allowlist permits four essential flows and blocks four forbidden flows.Record actual result

4 · Analyze and report

Draw sensor→gateway→broker→dashboard and identify the management zone. Explain why a deny rule is not a real firewall test.

Required evidence: Record the network segmentation & default deny comparison and justify the changed outcome from the calculated trace.

Model boundary: Enumerate 8 directed flow requests against an allowlist; compare essential and forbidden requests. No packets are sent.

Controlled investigation · reproducible evidence

Method. Use the existing reference workbench configuration and the named controlled changes below. A controlled variable stays fixed while the independent variable is intentionally changed; the dependent variable is the resulting observed output. First predict each trial from the Concepts page. Run the baseline, then change only the specified setting and record the outcome. For deterministic traces one execution per case and a repeated verification are sufficient; for timing or stochastic measurements repeat at least five times, recording each run, median and range. Reset to the reference state between independent comparisons.

TrialIndependent changeDependent observation
ReferenceUse reference inputs aboveRecord actual outcome and units
Controlled changeEnforce allowlist (0=no, 1=yes) = 0Record actual outcome and units

Evidence: attach the completed comparison table, one trace or screenshot per condition, and actual practical terminal/hardware evidence where applicable. Explain any prediction mismatch and distinguish modeled behavior from measured results.

Loading laboratory-specific procedure…

Python / Google Colab notebook

Original closed defensive reference model; no external targets. Validated locally in a fresh Jupyter kernel. Download, then upload to Google Colab.

Download NotebookOpen Google ColabAll Python notebooks

Practical procedure & acceptance

  1. Read the method, write a prediction and save the reference baseline.
  2. Apply the controlled change. Draw sensor→gateway→broker→dashboard and identify the management zone. Explain why a deny rule is not a real firewall test.
  3. Restore the reference and confirm the original metrics. Test an out-of-range or empty field; restore before exporting.
  4. Run independent host calculations from the extracted portal root:
    BASH · Command
    python3 verification/sec169_practical.py all
    Check the result for S02 and verify that all checks pass. No external dependencies or network connection are required.
  5. Export the observed results, record one limitation and discuss a deployment validation plan.

Experimental notebook

Record your own results. Values are not prefilled or independently verified.

Record & discuss

Portfolio exports map to core lab K01; the supplementary experiment ID is retained in the attachment. Completion is self-reported.

NISTIR 8259A · device baseline · NIST SP 800-61r3 · incident response

Python / Google Colab laboratory

S02 · 11 notebook cells · 3 executable Python cells

Complete the theoretical investigation first. Run the cells in order, record actual outputs and compare against your prediction.

How to execute

  1. Download this notebook and open Google Colab. Select File → Upload notebook and choose the downloaded .ipynb.
  2. Read the Markdown instructions before each executable cell. Use a Python runtime, run cells from top to bottom, and resolve imports if necessary.
  3. Perform the baseline and controlled changes. Save the notebook with actual outputs and your written interpretation.

Execution scope: Default computational cells passed isolated local Python execution; physical equipment and live services require separate verification.

01Instructions · Markdown
# s02 · Network segmentation & default deny **PSUT IoT Engineering Studio — Dr. Mohammad Alja’afreh** ## Introduction Evaluate necessary and prohibited communication flows in a fixed IoT topology. ## How to run 1. Download this notebook from the laboratory page. Open Google Colab → File → Upload notebook. 2. Select a Python CPU runtime. Run cells from top to bottom using Shift+Enter, or Runtime → Run all. 3. Read the printed observations and assertions. Change one parameter at a time and rerun the relevant cell. 4. Save your own outputs and compare them to the portal Experiment tab. **Execution boundary:** Original closed defensive reference model; no external targets. Do not run the hardware or service commands in Colab. No real credentials are needed. The notebook is self-contained.
02Instructions · Markdown
## Experiment-specific preparation Evaluate necessary and prohibited communication flows in a fixed IoT topology. **Reference procedure (use the matching simulator/WSL tool where named, not an unrelated service):** 1. Set Enforce allowlist (0=no, 1=yes) = 1. Observe the calculated results and trace. 2. Change Enforce allowlist (0=no, 1=yes) = 0. The allowlist permits four essential flows and blocks four forbidden flows. 3. Restore the reference values. Draw sensor→gateway→broker→dashboard and identify the management zone. Explain why a deny rule is not a real firewall test. **Evidence:** **Boundary:**
03Instructions · Markdown
## 1. Objectives and reference condition - Reproduce the specific computational mechanism in this laboratory. - Inspect the output, compare the reference condition with a changed or rejected condition where implemented, and explain any discrepancy. - Distinguish actual local Python execution from mock, physical and external-service observations. ## 2. Environment check
04Python · executable cell
PYTHON · Code cell
# =====================================================================
# S02 | Code cell 01 | Network segmentation & default deny
# Purpose: 1. Objectives and reference condition - Reproduce the specific computational mechanism in this laboratory. - Inspect the output, compare the reference condition with a changed or rejected condition where implem
# Inputs: the explicit fixture/settings below and any preceding cell state.
# Output: inspect printed values, returned records or assertions; record evidence.
# =====================================================================
import sys
print("Python",sys.version.split()[0])
# Check the expected invariant so a mismatch fails visibly instead of appearing successful.
assert sys.version_info >= (3,10)
Ask Dr. Mohammad about this cell
05Instructions · Markdown
## 3. Implementation Read the comments and variable definitions before execution. Assertions must pass; inspect values, not just completion.
06Python · executable cell
PYTHON · Code cell
# =====================================================================
# S02 | Code cell 02 | Network segmentation & default deny
# Purpose: implement only the mechanism named in this laboratory.
# Inputs: the explicit fictional fixture and reference parameters below.
# Output: printed observations and assertions for the controlled trial.
# =====================================================================
# Explicit role-to-zone flows; default deny when the rule is absent.
allowed={('sensor','broker'),('gateway','broker'),('admin','gateway'),('gateway','database')}
flows=list(allowed)+[('sensor','database'),('guest','broker'),('guest','admin'),('sensor','admin')]
def evaluate(segmented):return [(a,b,not segmented or (a,b) in allowed) for a,b in flows]
Ask Dr. Mohammad about this cell
07Instructions · Markdown
### Step 2 · Run the reference calculation Read the comments and variable definitions before execution. Assertions must pass; inspect values, not just completion.
08Python · executable cell
PYTHON · Code cell
# =====================================================================
# S02 | Code cell 03 | Network segmentation & default deny
# Purpose: implement only the mechanism named in this laboratory.
# Inputs: the explicit fictional fixture and reference parameters below.
# Output: printed observations and assertions for the controlled trial.
# =====================================================================
for segmented in (False,True):
    result=evaluate(segmented);print(segmented,result,'allowed',sum(ok for _,_,ok in result))
assert sum(ok for _,_,ok in evaluate(True))==4
Ask Dr. Mohammad about this cell
09Instructions · Markdown
## Original portal implementation (reference only) These are the actual laboratory snippets. They are retained for comparison; follow the portal setup for WSL, hardware or services. They are **not** executed by Run all. ```bash python3 verification/sec169_practical.py all ```
10Instructions · Markdown
## 4. Results and analysis Record the actual output and whether the assertions pass. Identify a parameter to vary, state your prediction, repeat the reference calculation, then explain the changed result. | Trial | Configuration | Observation | Interpretation | |---|---|---|---| | A | Reference | | | | B | One controlled change | | | | C | Reference repeat | | | **Limitations:** Original closed defensive reference model; no external targets. Notebook success does not certify external equipment or services.
11Instructions · Markdown
## Guided reasoning and evidence A controlled comparison changes one independent input while keeping the other relevant inputs fixed; the dependent variable is the recorded output. Use this lab’s reference condition above. **Independent task:** 2. Change Enforce allowlist (0=no, 1=yes) = 0. The allowlist permits four essential flows and blocks four forbidden flows. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat. | Trial | Input/configuration | Prediction | Observation | Evidence / limitation | |---|---|---|---|---| | A | Reference | | | | | B | Changed input | | | | | A repeat | Reference | | | | A conclusion is supported only when it cites the recorded values or observed states and explains them with the experiment theory.
Shared research workbenches · network designer & advanced studies
Concurrent-device simulation & Monte Carlo research
Distributed digital twin · topology, protocol & battery research