Learn how to secure networks, applications, and systems against digital threats.
Network security is the practice of protecting the systems, traffic, and boundaries of a network so that only intended communication happens. It applies the CIA Triad to everything that moves between hosts: keeping data confidential in transit, ensuring it is not altered, and keeping services reachable when they should be. This lesson builds a defensive mental model of a network. You will learn the attack surface, how to segment a network into security zones, how firewalls and ACLs enforce policy, the difference between detecting and preventing attacks (IDS vs IPS), how VPNs and TLS protect communication, and how zero trust changes the classic perimeter assumption. The running example is an enterprise network divided into zones. Everything here is conceptual and defensive: you will reason about policies and detections, never about attacking a real network.
Every reachable service, port, and protocol is a potential way in. Reducing attack surface means closing what is not needed.
A single firewall is a single point of failure. Defense in depth layers multiple controls so that if one fails, others still protect. Zones group systems by trust level and enforce policy at the boundaries between them.
The DMZ hosts internet-facing services (web servers). Even if a DMZ host is compromised, the internal firewall still separates it from the application and database networks.
Segmentation divides a network into smaller zones (VLANs, subnets, or micro-segments) so a breach in one zone cannot spread freely to another.
| Benefit | How it helps |
|---|---|
| Blast-radius reduction | Limits how far a compromise can move |
| Least privilege | Only required cross-zone traffic is allowed |
| Monitoring | Zone boundaries are natural inspection points |
| Compliance | Keeps sensitive data in isolated segments |
A firewall enforces a policy about which traffic may pass a boundary, based on rules that match addresses, ports, and protocols.
Packet filtering checks each packet against rules. An Access Control List (ACL) is an ordered list of rules applied top to bottom; the first match wins.
| Field | Example | Meaning |
|---|---|---|
| Source address | 10.0.1.0/24 | Traffic from this subnet |
| Destination address | 10.0.2.10 | A specific internal host |
| Protocol / port | TCP 443 | HTTPS only |
| Action | PERMIT / DENY | Allow or drop |
These are illustrative policy statements, not a real vendor syntax. Real rules follow the same shape: match, then permit or deny, with a default deny at the end.
An Intrusion Detection System (IDS) detects and alerts; an Intrusion Prevention System (IPS) detects and blocks. IPS sits inline in the traffic path, so a mistake can break availability, while IDS sits out of band and only observes.
| IDS | IPS | |
|---|---|---|
| Placement | Out of band (copy of traffic) | Inline (in the path) |
| Action | Detects and alerts | Detects and blocks/prevents |
| Risk | Low — cannot block | Higher — can drop legitimate traffic |
| Use | Visibility, forensics | Automated prevention |
| Approach | How it works | Strength | Weakness |
|---|---|---|---|
| Signature | Matches known attack patterns | Low false positives for known attacks | Misses unknown/new attacks |
| Anomaly | Flags deviations from a learned baseline | Can find novel attacks | More false positives; needs tuning |
A Virtual Private Network creates an encrypted tunnel across an untrusted network so traffic is confidential and tamper-evident.
| Remote Access VPN | Site-to-Site VPN | |
|---|---|---|
| Who connects | Individual users / devices | Whole networks / offices |
| Scale | Per user | Permanent tunnel between sites |
| Typical use | Remote workers | Connecting branch offices or clouds |
| Attack | Concept | Defense |
|---|---|---|
| DoS / DDoS | Overwhelm a service with traffic | Rate limiting, redundancy, scrubbing |
| ARP spoofing | Attacker answers ARP with their MAC | Monitoring, static entries, network segmentation |
| DNS attacks | Poisoning or hijacking name resolution | DNSSEC, monitoring, trusted resolvers |
| Man-in-the-middle | Intercepting traffic in transit | TLS, mutual authentication, VPNs |
A web server in the DMZ needs to reach the database, but the internet must not.
(the database is reachable only from the application tier)
You want visibility on the whole network but only want to block at the edge.
(prevent at the perimeter, detect deeper inside)