Segmentation

Segmentation turns one break-in into one room, not the building

Flat networkone network, no internal barriers12 of 12 machines reachable from one compromised laptopSegmented networkUsersServersPayments4 of 12 reachable; servers and payments sit behind firewallsSegmentation turns one break-in into one room, not the whole building.On a flat network every machine can reach every other, so one phished laptop is a path to everything. Splittingthe network into zones, with firewalls allowing only the traffic each zone needs, stops lateral movement andshrinks what an audit has to cover: PCI DSS scope ends at the payment zone’s boundary.

Network segmentation limits lateral movement and reduces audit scope.

Ways to segment · Going deeper

VLANs, screened subnets, microsegmentation and air gaps

Segment with VLANs and subnets, a screened subnet (DMZ), microsegmentation, jump servers and air gaps.

  • Subnets and VLANs split one physical network into separate logical ones; traffic between them passes through a router or firewall where rules apply.
  • Screened subnet (DMZ) a zone for internet-facing servers, between two firewalls, so a breached web server does not land inside the internal network.
  • Microsegmentation rules around each workload, often enforced by software on the host or the hypervisor, so even two servers in the same zone cannot talk unless allowed.
  • Jump server (bastion host) the one hardened, logged machine administrators use to reach a sensitive zone.
  • Air gap no network connection at all, for the most critical systems such as some industrial controls. Removable media then becomes the path in.
  • Cloud virtual networks, subnets and security groups do the same job; the principles are identical.
Segmentation also limits compliance scope: only the zone holding card data is in scope for PCI DSS, if the boundary is proven.

Firewall rules

A firewall reads rules top to bottom; the first match decides

A packet arrives:10.1.5.20 (a user laptop) → 10.2.0.10 (a server), port 22, SSH#SourceDestinationPortActionThis packet1anyweb server (DMZ)443allow✗ destination2users 10.1.0.0/16app servers8443allow✗ port3admin jump hostall servers22allow✗ source4anyanyanydeny✓ match: droppedRules are read top to bottom and the first match wins. The last rule denies everything not allowed above.A firewall checks each connection against an ordered list; anything not explicitly allowed is denied.Rules match on source, destination, port and protocol. Order matters: a broad allow placed too high lets trafficthrough before a stricter rule is reached. Default deny means a forgotten case fails closed, not open. Statefulfirewalls remember connections, so replies to allowed traffic come back without extra rules.

Firewall rules use first match and end in implicit deny. Stateful firewalls track connections.

Firewall types · Going deeper

From packet filters to next-generation and web application firewalls

Know stateless and stateful firewalls, proxies, NGFW, WAF, host-based firewalls and cloud security groups.

  • Packet filter (stateless) checks each packet’s addresses and ports alone. Fast, but replies need their own rules and it is easy to fool.
  • Stateful firewall tracks connections, so a reply to an allowed request is let back in automatically.
  • Proxy (application-level gateway) ends the connection and opens a new one, inspecting the application content in between.
  • Next-generation firewall (NGFW) recognises applications and users, not just ports, decrypts TLS for inspection, and includes IPS features.
  • Web application firewall (WAF) protects web apps from injection, XSS and similar at layer 7; can “virtually patch” a known flaw.
  • Host-based firewall runs on each machine, so protection travels with a laptop.
  • Cloud security groups and network ACLs security groups are stateful and attached to instances; network ACLs are stateless and attached to subnets.

IDS and IPS

An IDS tells you about an attack; an IPS can stop it

IDS: watches a copy of the trafficIDSalerts, but the packet already arrivedIPS: sits in the path and can blockIPSonly clean trafficmalicious packet droppedAn IDS detects and tells you; an IPS sits inline and stops it, at the risk of blocking good traffic.An IDS reads a copy of traffic from a mirror port or tap, so it cannot break anything, and cannot stop anything.An IPS is inline: it can drop an attack in real time, but a false positive blocks real users, and if it fails itmust fail open (traffic flows) or fail closed (traffic stops). Both use signatures and anomaly detection.

An IDS watches a copy of traffic and alerts; an IPS sits inline and blocks. Both use signature-based and anomaly-based detection.

IDS and IPS · Going deeper

Most alerts are false alarms, and the misses are the danger

One week: 10,000 events, of which 50 are real attacksAlert raisedNo alertReal attackBenign45 True positivereal attack, alert raised5 False negativereal attack, missed255 False positivebenign, alert raised9,695 True negativebenign, no alertOnly 45 of 300 alerts were real: 15%analysts drown in noise (alert fatigue)5 of 50 attacks missed: 10%the most dangerous cell: nobody looksTuning trades one error for the other: stricter rules mean fewer false positives and more misses.Every detection system makes two kinds of mistake; tuning trades false alarms against missed attacks.A false positive wastes time and, inline, blocks real users. A false negative is an attack nobody sees. Because realattacks are rare, even a good detector produces mostly false alarms, so teams tune rules, add context andautomate triage. The same four cells apply to biometrics, spam filters and malware scanners.

True positives, false positives, false negatives and true negatives; tuning trades one error for another.

Zero trust

Zero trust checks every request; location earns nothing

Priyaon her laptop, at homerequestEnforcement pointgateway or proxyPolicy decision pointidentity + MFA · device healthlocation · time · behaviour · data sensitivityallow, for this sessionpayroll app only, read only, re-checked continuouslyPayroll appeverything else: unreachableNothing is trusted for being “inside”: every request is authenticated, authorised and checked.Zero trust checks every request on its own merits; being on the network earns nothing.A policy decision point weighs identity, device health and context; an enforcement point allows or blocks. Accessis granted per application, per session, and re-checked when risk changes. A stolen password from an unknowndevice fails; a compromised laptop reaches one app, not the network. NIST SP 800-207 describes the model.

Zero trust (NIST SP 800-207) uses a policy decision point and a policy enforcement point for every request.

Zero trust architecture · Going deeper

The parts of NIST SP 800-207, and how companies adopt it

NIST SP 800-207 defines the policy engine, policy administrator and policy enforcement point on a control plane and a data plane.

The parts

  • Policy engine (PE) makes the decision: grant, deny or revoke, using policy and signals.
  • Policy administrator (PA) carries out the decision: sets up or tears down the session, issues tokens.
  • Policy enforcement point (PEP) the gate in the traffic path that allows or blocks.
  • Signals identity and MFA, device posture from EDR and device management, threat intelligence, activity logs, data classification.

Control plane

Where decisions are made: the policy engine and administrator.

Data plane

Where traffic flows: users, devices, enforcement points and resources.

How it shows up in practice

Zero trust network access (ZTNA) replaces VPNs with per-application access. Secure access service edge (SASE) delivers ZTNA, secure web gateways and firewalls as one cloud service. Adoption is gradual: strong identity first, then device health, then microsegmentation.

VPNs

A VPN protects the path across untrusted networks

Full tunnel: everything goes through the companyCafé Wi-Fiencrypted tunnel (IPsec or TLS)VPN gatewaycompany appsinternet, via the companySplit tunnel: only company traffic uses the tunnelCafé Wi-Fiencrypted tunnel (IPsec or TLS)VPN gatewaycompany appsinternet, directlyweb traffic goes direct: faster, but skips company filteringA VPN wraps traffic in an encrypted tunnel across untrusted networks; it secures the path, not the user.Remote-access VPNs connect a device; site-to-site VPNs join whole offices. IPsec works at the network layer, TLSVPNs through a browser or client. A VPN still trusts whoever connects, which is why internet-facing VPN gatewaysare prime targets, and why many companies are replacing them with zero trust network access (ZTNA).

A VPN uses IPsec or TLS. A full tunnel sends all traffic home; a split tunnel only company traffic.

DDoS

Against a flood, the defence is to be bigger than the flood

botnethijacked cameras and routers31.4 Tbps: the record, 2025scrubbing networkhundreds of locations (anycast)only clean trafficyour siteTypeMeasured inExampleDefenceVolumetricbits per secondUDP and DNS amplification floodsabsorb across a large anycast networkProtocolpackets per secondSYN flood fills connection tablesSYN cookies, stateful scrubbingApplicationrequests per secondHTTP floods on expensive pagesrate limits, WAF rules, cachingA DDoS attack wins by volume, so the defence is to be bigger: spread the flood across a global network.Distributed denial of service uses thousands of hijacked devices to exhaust bandwidth, connection tables orservers. No single firewall can absorb terabits, so sites sit behind a CDN or scrubbing provider that filtersat the edge. Amplification abuses open DNS or NTP servers to turn small requests into huge replies.

DDoS attacks are volumetric, protocol or application layer; scrubbing and anycast networks absorb them.

Secure protocols

Every clear-text protocol has a secure twin, on its own port

Sends in clear textPortSecure replacementPortTelnet23SSH22FTP20, 21SFTP (over SSH), or FTPS22 or 990HTTP80HTTPS (HTTP over TLS)443SMTP mail submission25SMTP submission with STARTTLS, or SMTPS587 or 465POP3, IMAP110, 143POP3S, IMAPS995, 993LDAP389LDAPS636SNMP v1, v2c161SNMPv3: adds authentication and encryption161DNS53DNS over TLS or HTTPS; DNSSEC signs answers853 or 443Old protocols send passwords in clear text; each has a secure version, and the exams expect the ports.Anyone on the path can read Telnet, FTP or HTTP, including the login. The secure versions wrap the same job inSSH or TLS. When you see the left column on a network, treat it as a finding: replace it, or at least isolate it.

Replace Telnet, FTP, HTTP, LDAP and SNMP v1/v2c with SSH, SFTP, HTTPS, LDAPS and SNMPv3.

Network attacks · Going deeper

ARP and DNS poisoning, rogue access points and Wi-Fi security

Know ARP poisoning, DNS poisoning, evil twin access points, VLAN hopping, WPA3 and 802.1X.

Attacks on the local network

  • ARP poisoning the attacker answers “that IP address is at my hardware address”, putting themselves on the path. Defence: dynamic ARP inspection on switches.
  • DNS poisoning false answers send users to the attacker’s server. Defences: DNSSEC, trusted resolvers, encrypted DNS.
  • MAC flooding and VLAN hopping overwhelm a switch’s address table, or abuse trunk tagging to reach another VLAN. Defences: port security and disabling unused trunking.
  • Rogue access point and evil twin an unauthorised access point plugged into the network, or a fake one copying a real network name to capture logins.

Wireless security

WPA3-PersonalSAE replaces the pre-shared key handshake, resisting offline password guessing
WPA2/3-Enterprise802.1X with a RADIUS server: each user or device authenticates individually
WEP, WPAbroken; never use
Network access control (NAC) checks a device’s identity and health before letting it onto the network, often using 802.1X on wired ports too.

Lesson complete

You finished “Network security”

Nicely done.

Open in a new tab