Skip to content
Tutorials Center
My learning

Topics

Lesson 31 of 38 ยท Web, Network and Cloud Testing

Network Segmentation, Firewalls and Wireless Testing

Learn how internal network tests verify segmentation and firewall rules, how to audit rule sets for risky entries, and how authorized wireless assessments are scoped.

Network penetration testing asks two questions. From the outside, what can a stranger on the internet reach? From the inside, what can a stolen laptop, a visitor on guest Wi-Fi or a compromised workstation reach? The answers depend less on clever exploits than on the design: segmentation (splitting the network into zones) and firewall rules (deciding who may talk to whom).

This lesson shows how to test those controls and how to audit a rule set. Everything runs on invented rules and addresses. Active network testing, especially against wireless networks, can affect other people, so it must stay strictly inside the signed scope.

External versus internal tests

External test Internal test
Starting point The internet A network port, VPN or compromised host
Goal Find exposed services and weak edges Measure how far one foothold can reach
Typical findings Open admin ports, outdated VPN, exposed databases Flat network, reused admin passwords, legacy protocols
Defense focus Reduce attack surface, patch edge devices Segmentation, least privilege, monitoring

An assumed breach test starts inside with a normal user account and a standard laptop. It skips the lucky-exploit phase and measures what really matters: how much damage one compromised user can do.

What good segmentation looks like

flowchart TB
    I["Internet"] --> FW1["Edge firewall"]
    FW1 --> DMZ["DMZ: public web, mail relay"]
    FW1 --> VPN["VPN users"]
    DMZ --> FW2["Internal firewall"]
    VPN --> FW2
    FW2 --> USERS["User network"]
    FW2 --> SERVERS["Server network"]
    FW2 --> MGMT["Management network<br/>(admin only)"]
    FW2 --> GUEST["Guest Wi-Fi<br/>(internet only)"]
    FW2 --> IOT["IoT and printers"]

Zones separated by firewall rules. Traffic that crosses a boundary should be allowed only where there is a need.

A segmentation test proves the lines hold. From a host in zone A, check whether ports in zone B are reachable using a port scanner or simple connection tests, then compare to the policy. The usual surprises are guest or IoT networks that can reach user machines, user machines that can reach the management network, and database servers reachable from the whole company instead of only from the application servers.

Segmentation checks

Guest to internal Should be blocked
IoT to servers Should be blocked
Users to management Should be blocked
Anyone to database Only the app servers

Test from each zone, then compare to the policy.

1 / 2

Auditing a firewall rule set

Reviewing the firewall configuration is often faster and safer than probing. Typical problems are:

  • Any-any rules: source any, destination any, port any.
  • Overly wide sources or ports such as a whole /8 network, or 1-65535.
  • Risky management protocols open to the internet (Telnet, RDP, SMB, database ports).
  • Shadowed rules: a later rule can never match because an earlier one already covers it.
  • No logging on deny rules, no comments or owners, stale rules for decommissioned systems.
Python Audit a firewall rule list

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The audit finds the internet-exposed RDP rule, the wide "all ports" rule, the any-any-any rule left over from testing, and the entry that earlier rules shadow. The remediation story is always the same: least privilege, short-lived temporary rules with expiry dates, and an owner for every rule.

Testing connectivity safely

When you test segmentation actively, scan only the agreed ranges, use modest speeds, and avoid fragile devices (medical equipment, industrial controllers and old printers can crash from a port scan). A basic matrix of expected versus observed results is a clear way to report:

Python Compare expected policy to observed reachability

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Two cells differ: guest Wi-Fi can reach the user network and users can reach the management network. Those are the two segmentation findings to report, each with the test evidence and the specific rule to add.

Network services that often matter

  • Legacy and cleartext protocols (Telnet, FTP, SNMP v1/v2c with default community strings, HTTP admin pages).
  • Name resolution fallbacks (LLMNR, NetBIOS, mDNS) that allow credential capture on local networks.
  • SMB without signing and open file shares with weak permissions.
  • Default credentials on switches, printers, cameras and BMC/iLO management interfaces.
  • VPN and edge devices running outdated firmware.
  • Network Access Control (NAC): can an unknown laptop plug into a wall port and get an address?

Wireless assessments

A wireless test checks the radio side of the network. Authorization is critical because signals cross walls and reach neighbours, so you must prove which networks (SSIDs, access points, MAC addresses) belong to the client and test only those.

Typical checks:

  • Encryption and authentication: WPA2/WPA3 versus open or WEP; WPA2-Personal with a weak pre-shared key versus WPA2/3-Enterprise (802.1X) with certificate validation.
  • Rogue and unmanaged access points inside the office.
  • Guest network isolation: can a guest reach internal systems or other guests?
  • Captive portal and client isolation settings.
  • Evil-twin resilience: do company devices connect automatically to a look-alike network? This is a test of client configuration, run only with explicit written approval and never against other people's devices.

Defenses to recommend: WPA3 or WPA2/3 Enterprise with certificate checks, long random pre-shared keys where Enterprise is not possible, separate SSIDs and VLANs for guests and devices, rogue-AP detection, and disabling WPS.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does an assumed-breach internal test start from?

    It skips the initial entry and measures how far one compromised user can go.
  2. 2. Which firewall rule is the clearest finding?

    An any-any-any allow rule defeats the firewall's purpose.
  3. 3. A guest Wi-Fi host can reach internal workstations. What is the issue?

    Guests are untrusted and should be isolated from internal systems.
  4. 4. Before testing a wireless network, what must you establish?

    Radio signals reach other people's networks, so scope must be precise.

Summary

  • External tests measure the attack surface; internal and assumed-breach tests measure how far one foothold reaches.
  • Good segmentation separates guest, user, server, management and IoT zones; test from each zone against the policy.
  • Audit firewall rules for any-any entries, risky open ports, wide ranges, shadowed rules and missing owners.
  • Be gentle with fragile devices and scan only agreed ranges.
  • Wireless tests need precise scope; recommend WPA3 or Enterprise, isolation and rogue-AP detection.

Next: Cloud penetration testing