← DevSecOps← DevSecOps
DevSecOpsDevSecOps19 Th7, 2026Jul 19, 202624 phút đọc18 min read

Bảo mật mạng & Zero TrustNetwork Security & Zero Trust

Thuộc bộ kiến thức DevSecOps Roadmap.

Tổng quan

Bảo mật mạng (network security) là lớp phòng thủ theo chiều sâu (defense-in-depth) kiểm soát cách traffic được phép di chuyển — giữa internet và hệ thống của bạn, giữa các zone bên trong môi trường, và giữa từng workload riêng lẻ. Trong bối cảnh DevSecOps, bảo mật mạng không chỉ là mối quan tâm ở perimeter do một team networking riêng sở hữu; nó được biểu diễn dưới dạng code (security group, network policy, firewall rule) nằm trong cùng repository và pipeline với application code, và ngày càng được xây dựng xoay quanh Zero Trust thay vì một mạng nội bộ được tin tưởng đứng sau một perimeter được gia cố kỹ.

Note này tập trung vào các khái niệm và quyết định mà một DevSecOps engineer cần: firewall, IDS/IPS và ACL làm gì và cách suy luận về rule của chúng; cách thiết kế network zone và segmentation sao cho một breach ở một chỗ không biến thành breach ở mọi chỗ; cách suy nghĩ và giảm thiểu tấn công DDoS; và cách Zero Trust Architecture định hình lại bảo mật mạng xoay quanh identity và việc xác minh liên tục thay vì vị trí mạng. Để tìm hiểu sâu hơn về cơ chế cấp thiết bị của firewall, ACL và IDS/IPS (luồng packet, chi tiết bên trong stateful inspection, cú pháp ACL kiểu Cisco, VLAN hopping, ARP poisoning, v.v.), xem Network Engineer — Network Security, viết từ góc nhìn network engineering. Note này xây dựng trên nền tảng đó và áp dụng vào cách các tổ chức cloud-native, vận hành theo pipeline hiện đại thiết kế và vận hành mạng một cách an toàn.

Đây là tài liệu giáo dục bảo mật mang tính phòng thủ (defensive): mục tiêu là hiểu các cơ chế kiểm soát này đủ sâu để thiết kế, cấu hình và audit chúng đúng cách — không phải để vượt qua (bypass) chúng.

Kiến thức nền tảng

Firewall — tóm tắt nhanh

Firewall thực thi một chính sách quy định traffic nào được phép đi qua một ranh giới (boundary). Có ba thế hệ mà một DevSecOps engineer cần nhận biết:

LoạiKiểm traTính statefulỨng dụng phổ biến hiện nay
Packet-filteringChỉ header IP/port/protocol, theo từng packetStateless — mỗi packet được đánh giá độc lậpHiếm khi đứng riêng; là nền tảng của ACL đơn giản và NACL trên cloud
Stateful inspectionHeader + trạng thái kết nối (theo dõi phiên TCP/UDP)Stateful — chỉ cần cho phép chiều khởi tạo, traffic trả về được tự động cho phépSecurity group trên cloud, phần lớn firewall on-prem, host firewall (iptables/nftables, Windows Firewall)
Next-Generation Firewall (NGFW)Header, state, payload — nhận diện ứng dụng/người dùng, nội dung đã giải mã TLS, IPS tích hợp, threat intelligenceStateful + deep packet inspectionPerimeter/edge, firewall segmentation nội bộ, tương đương trên cloud-native (AWS Network Firewall, Azure Firewall Premium)

Trong môi trường cloud, tương đương hàng ngày của một stateful firewall là security group (stateful, áp dụng ở cấp instance/ENI) kết hợp với network ACL (stateless, áp dụng ở ranh giới subnet) — xem note Cloud để biết chi tiết theo từng provider. Điểm mấu chốt về vận hành cho DevSecOps: firewall rule nên được định nghĩa dưới dạng code (Terraform, CloudFormation, Kubernetes NetworkPolicy) và trải qua cùng quy trình review/CI như application code, chứ không phải chỉnh sửa thủ công trên console hay thiết bị.

IDS vs IPS

Cả Intrusion Detection System và Intrusion Prevention System đều phân tích traffic để tìm pattern độc hại; khác biệt nằm ở việc điều gì xảy ra sau khi phát hiện điều đáng ngờ.

Khía cạnhIDS (Intrusion Detection System)IPS (Intrusion Prevention System)
Vị trí đặtOut-of-band, theo dõi một bản sao của traffic (qua SPAN/mirror port hoặc tap)Inline, nằm trực tiếp trên đường đi của traffic
Hành động khi phát hiệnChỉ cảnh báo — ghi log, phát alarm, thông báo cho SOC/SIEMCó thể chủ động chặn, drop packet, reset kết nối, hoặc cách ly nguồn
Ảnh hưởng của false positiveAlert gây nhiễu, không gián đoạn dịch vụCó thể drop traffic hợp lệ — rủi ro về availability nếu tinh chỉnh không tốt
Overhead hiệu năngThấp hơn (phân tích trên bản sao)Cao hơn (phải kiểm tra và quyết định real-time, tăng độ trễ)
Chế độ thất bại (failure mode)Vốn đã “fail open” (traffic đã đi qua rồi)Phải cấu hình rõ ràng fail-open hay fail-closed

Phương pháp phát hiện (áp dụng cho cả IDS và IPS):

NIDS vs HIDS: một Network IDS/IPS (Suricata, Snort, Zeek) theo dõi traffic trên đường truyền tại một điểm nghẽn (span port, inline tap); một Host IDS/IPS (OSSEC, Wazuh, Falco cho container) theo dõi hoạt động trên một host hoặc container đơn lẻ — file integrity, process execution, syscall. Trong pipeline DevSecOps, các công cụ kiểu HIDS chạy dưới dạng sidecar hoặc DaemonSet (ví dụ: Falco trong Kubernetes) thường liên quan hơn so với network tap cổ điển, vì traffic east-west bên trong một cluster hoặc overlay network là vô hình đối với một NIDS ở perimeter.

ACL (Access Control List)

ACL là một danh sách có thứ tự các rule permit/deny được so khớp với đặc điểm của traffic. Hai dạng cốt lõi:

LoạiSo khớp trênĐộ chi tiếtVị trí đặt điển hình
Standard ACLChỉ địa chỉ IP nguồnThôGần đích (vì không thể lọc theo service/đích)
Extended ACLIP nguồn, IP đích, protocol, port nguồn/đíchChi tiếtGần nguồn (lọc traffic càng sớm càng tốt)

Ba quy tắc cần khắc cốt ghi tâm:

  1. Thứ tự quan trọng — rule được đánh giá từ trên xuống dưới, và rule khớp đầu tiên sẽ thắng; một “deny” rộng đặt trên một “permit” cụ thể sẽ âm thầm chặn permit đó và không bao giờ được xử lý tới.
  2. Implicit deny (deny ngầm định) — gần như mọi hiện thực ACL đều kết thúc bằng một “deny all” vô hình sau rule tường minh cuối cùng. Nếu không có gì khớp, traffic bị drop. Đây chính là biểu hiện thực tế của default-deny / least privilege ở tầng mạng.
  3. Hướng (direction) — ACL được áp dụng theo từng interface, theo từng hướng (inbound vs outbound); cùng một danh sách rule có thể mang ý nghĩa rất khác nhau tùy vào việc nó được gắn theo hướng nào.

Ví dụ extended ACL (cú pháp Cisco IOS) cho phép HTTPS tới web tier từ bất kỳ đâu, SSH chỉ từ subnet quản trị, và deny mọi thứ còn lại:

ip access-list extended WEB-TIER-IN
 permit tcp any host 10.0.1.10 eq 443
 permit tcp 10.0.100.0 0.0.0.255 host 10.0.1.10 eq 22
 deny   ip any any log
!
interface GigabitEthernet0/1
 ip access-group WEB-TIER-IN in

Ý định tương đương được biểu diễn dưới dạng Kubernetes NetworkPolicy (namespace default-deny, sau đó allow tường minh) — phiên bản cloud-native, thân thiện với pipeline của ACL ở trên:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: default-deny-all
  namespace: web-tier
spec:
  podSelector: {}
  policyTypes: ["Ingress", "Egress"]
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-https-from-anywhere
  namespace: web-tier
spec:
  podSelector:
    matchLabels: { app: web }
  policyTypes: ["Ingress"]
  ingress:
    - from: []
      ports:
        - protocol: TCP
          port: 443

Chú ý ba nguyên tắc trên vẫn áp dụng: một default-deny tường minh, các allow rule được thu hẹp phạm vi, và cách đánh giá mang tính cộng dồn (rule NetworkPolicy của Kubernetes được OR với nhau — không có kiểu “khớp đầu tiên thắng” như ACL của Cisco, đây là khác biệt quan trọng cần lưu ý khi chuyển đổi giữa hai mô hình).

Để tìm hiểu sâu hơn về cú pháp ACL, wildcard mask và cơ chế cấu hình theo từng thiết bị, xem Network Engineer — Network Security § ACLs.

Khái niệm chính

Network segmentation và secure zoning

Segmentation chia mạng thành các zone tách biệt để việc một zone bị compromise không tự động cho phép truy cập vào mọi zone khác — nó giới hạn blast radius (phạm vi ảnh hưởng) của kẻ tấn công và làm chậm hoặc chặn đứng lateral movement (di chuyển ngang).

Zone/kỹ thuậtMục đíchVí dụ
DMZ (demilitarized zone)Chứa các hệ thống cần truy cập được từ internet, tách biệt khỏi mạng nội bộ đáng tin cậyWeb server public, reverse proxy, mail gateway
Internal zone (zone nội bộ)Nhóm các hệ thống nội bộ theo mức độ tin cậy hoặc chức năng để traffic xuyên zone phải đi qua một policy enforcement pointVLAN người dùng, VLAN server/app, VLAN database, VLAN quản trị
MicrosegmentationThực thi chính sách chi tiết, thường theo từng workload — xuống tới từng pod, container, hoặc VM — bất kể topology vật lý/mạngKubernetes NetworkPolicy, security group theo từng service trên cloud, service mesh mTLS + authorization policy (Istio, Linkerd)

Tại sao segmentation quan trọng đến vậy trong thực tế: hầu hết các breach nghiêm trọng không phải là “kẻ tấn công vào được một server và thế là xong” — mà là một chuỗi: chỗ đứng chân ban đầu (ví dụ: một web app dễ tổn thương trong DMZ) → di chuyển ngang (tới database hoặc hệ thống admin nội bộ) → leo thang đặc quyền (privilege escalation) → exfiltration (đánh cắp dữ liệu). Segmentation phá vỡ chuỗi này ở bước thứ hai. Nếu không có nó, một container bị compromise thường có thể tới được mọi service khác trong một mạng phẳng; với microsegmentation đúng cách, chính container đó chỉ có thể tới các service cụ thể mà NetworkPolicy/security group của nó cho phép tường minh — mọi thứ còn lại là implicit deny.

Nguyên tắc thiết kế segmentation:

Chiến lược giảm thiểu DDoS

Tấn công Distributed Denial of Service (DDoS) nhắm vào việc làm cạn kiệt availability của mục tiêu — băng thông, trạng thái kết nối, hoặc năng lực ứng dụng — bằng traffic từ nhiều nguồn phân tán. Việc giảm thiểu hiệu quả phụ thuộc vào việc nhận diện tầng nào đang bị tấn công.

Loại tấn côngTầng OSICạn kiệt cái gìVí dụGiảm thiểu chính
VolumetricL3/L4Băng thông mạngUDP/ICMP flood, khuếch đại DNS/NTPAnycast + scrubbing center, dịch vụ DDoS protection của ISP/cloud thượng nguồn, blackhole nguồn cực đoan
ProtocolL3/L4Bảng trạng thái kết nối của server/thiết bị mạngSYN flood, ping of death, tấn công phân mảnh packetSYN cookie, giới hạn số kết nối trên stateful firewall, rate limiting ở edge
Application-layerL7Năng lực compute/database của ứng dụng/backendHTTP flood, slow POST (Slowloris), lạm dụng API vào endpoint tốn kémRule WAF, rate limiting theo client/IP/API key, CAPTCHA/trang challenge, caching (CDN), validate request

Các kỹ thuật giảm thiểu cốt lõi, dùng kết hợp:

Một kế hoạch ứng phó DDoS (một phần của incident response) nên xác định: ai công bố sự cố, tầng giảm thiểu nào kích hoạt tự động (rule CDN/WAF) so với cần quyết định của con người (liên hệ nhà cung cấp scrubbing thượng nguồn), và cách truyền đạt tình trạng trong suốt sự cố.

Zero Trust Architecture (NIST SP 800-207)

Zero Trust đảo ngược mô hình bảo mật mạng truyền thống. Bảo mật perimeter kiểu “castle-and-moat” (lâu đài-hào nước) truyền thống giả định rằng bất cứ thứ gì bên trong ranh giới mạng đều tương đối đáng tin cậy — một khi thiết bị hoặc người dùng đã ở trong mạng nội bộ, họ thường có thể tiếp cận một loạt tài nguyên khác với rất ít ma sát bổ sung. Zero Trust giả định điều ngược lại: không người dùng, thiết bị, hay vị trí mạng nào được tin tưởng mặc định, bất kể request xuất phát từ đâu — mọi request đều phải được xác thực (authenticate), phân quyền (authorize), và mã hóa, liên tục, dựa trên identity và ngữ cảnh (context) thay vì vị trí mạng. Điều này được thể hiện trong khẩu hiệu “never trust, always verify”.

Các nguyên tắc cốt lõi từ NIST SP 800-207:

  1. Mọi nguồn dữ liệu và dịch vụ tính toán đều được coi là resource — mọi resource đều cần access control, không có ngoại lệ vì “nằm trong nội bộ”.
  2. Mọi giao tiếp đều được bảo mật bất kể vị trí mạng — việc ở trên LAN của công ty không mang lại tin cậy ngầm định; traffic được mã hóa và xác thực như nhau bất kể xuất phát từ nội bộ hay bên ngoài.
  3. Quyền truy cập vào từng resource riêng lẻ được cấp theo từng phiên (per-session) — trust được đánh giá và cấp cho một phiên/request đơn lẻ, không phải một cách dai dẳng cho thiết bị hay người dùng sau khi đã xác thực một lần.
  4. Quyền truy cập được xác định bởi policy động — được đánh giá dựa trên identity, tình trạng/độ khỏe của thiết bị (device posture), thuộc tính hành vi, và ngữ cảnh môi trường (thời gian, vị trí, threat intelligence), không chỉ dựa trên một vai trò (role) tĩnh.
  5. Tổ chức giám sát và đo lường tính toàn vẹn cùng tư thế bảo mật của mọi tài sản (asset) sở hữu và liên quan — tình trạng sức khỏe/patch của thiết bị được đưa vào quyết định truy cập.
  6. Mọi xác thực và phân quyền resource đều động và được thực thi nghiêm ngặt trước khi cho phép truy cập — đánh giá lại liên tục, không phải “xác thực một lần, tin tưởng mãi mãi”.
  7. Tổ chức thu thập càng nhiều thông tin càng tốt về trạng thái hiện tại của asset, hạ tầng mạng, và giao tiếp, và dùng nó để cải thiện tư thế bảo mật — logging và telemetry phản hồi ngược lại vào policy.

Các thành phần kiến trúc (mô hình NIST 800-207):

PE + PA kết hợp lại thường được gọi chung là Policy Decision Point (PDP), đối lập với PEP nằm gần resource hơn.

Cơ chế then chốt hiện thực hóa Zero Trust trong thực tế:

Defense-in-depth áp dụng vào thiết kế mạng

Zero Trust không thay thế firewall, IDS/IPS, hay segmentation — nó là nguyên lý tổ chức gắn kết chúng lại với nhau, với identity là lớp kết nối. Một mạng được thiết kế tốt áp dụng tất cả những điều này cùng nhau, theo từng lớp:

Phòng thủ nhiều lớp, từ Internet vào trong
  1. Lớp 1
    Edge / CDN / WAFPerimeter: NGFW/WAF, DDoS scrubbing, anycast
  2. Lớp 2
    DMZdịch vụ public-facing, reverse proxy
  3. Lớp 3
    Mạng lõi nội bộSegmentation: zone nội bộ, VLAN/subnet, NACL; đi qua policy enforcement point — extended ACL / stateful FW
  4. Lớp 4
    Users và ServicesMicrosegmentation: NetworkPolicy theo workload / security group / service-mesh mTLS
  5. Lớp 5
    PEPpolicy enforcement point theo từng service — sidecar/gateway. Lớp identity Zero Trust: mọi request được xác thực và phân quyền bất kể xuất phát từ zone nào
  6. Lớp 6
    ResourceDetection: IDS/IPS (NIDS tại điểm nghẽn, HIDS theo từng host/container), logging tập trung tới SIEM

Mỗi lớp giả định rằng những lớp “bên ngoài” nó có thể thất bại: firewall perimeter có thể bị cấu hình sai, một host trong DMZ có thể bị compromise, kẻ tấn công có thể có được credential trông có vẻ hợp lệ — việc xác minh liên tục, dựa trên identity ở mọi hop của Zero Trust chính là thứ giới hạn mức độ lan rộng của một thất bại đơn lẻ đó, và IDS/IPS cùng logging tập trung là thứ biến “chúng ta đã bị breach” thành “chúng ta phát hiện trong vài phút, không phải vài tháng”. Điều này mở rộng trực tiếp mô hình defense-in-depth từ note Giới thiệu DevSecOps sang cụ thể tầng mạng.

Bảo mật perimeter truyền thống vs. Zero Trust

Khía cạnhPerimeter truyền thống (“castle-and-moat”)Zero Trust
Cơ sở của trustVị trí mạng (bên trong = tin cậy, bên ngoài = không tin cậy)Identity và ngữ cảnh (người dùng, thiết bị, workload) — vị trí không phải là tín hiệu tin cậy
PerimeterMột ranh giới được gia cố duy nhất (firewall ở edge)Không có perimeter duy nhất; mọi resource tự thực thi ranh giới của riêng nó (PEP)
Traffic nội bộPhần lớn được tin cậy sau khi qua perimeter (mạng nội bộ phẳng)Được xác thực và phân quyền ở mọi request, mã hóa khi truyền
Độ chi tiết truy cậpRộng — truy cập cấp VLAN/subnet một khi đã kết nốiChi tiết — theo từng resource, từng phiên, least-privilege
Mô hình truy cập từ xaVPN — đặt người dùng từ xa “vào trong mạng”ZTNA — môi giới truy cập tới từng ứng dụng riêng lẻ, người dùng không bao giờ gia nhập mạng
Rủi ro lateral movementCao — compromise một host thường làm lộ nhiều host khácThấp — microsegmentation và xác thực theo từng request giới hạn resource có thể tiếp cận
Cơ sở của policyRule tĩnh (IP/subnet/port)Policy động (identity, device posture, hành vi, tín hiệu rủi ro)
Chế độ thất bạiĐiểm lỗi đơn (single point of failure) — phá được perimeter, tiếp cận được mọi thứ bên trongDefense-in-depth theo thiết kế — compromise một credential/phiên không cấp quyền truy cập rộng
Nơi thực thiThiết bị mạng ở edgePhân tán — mọi ranh giới service/workload

Zero Trust không có nghĩa là “không có bảo mật mạng” hay “không có firewall” — segmentation, ACL, IDS/IPS, và phòng thủ perimeter đều vẫn hiện diện; Zero Trust bổ sung một bước kiểm tra identity-và-ngữ-cảnh bắt buộc ở mọi hop thay vì dựa vào vị trí mạng như một tín hiệu tin cậy ngầm định. Trong thực tế, hầu hết tổ chức chuyển sang Zero Trust theo từng bước, phủ thêm identity-aware proxy và microsegmentation lên một mạng đã được segment sẵn thay vì thay thế toàn bộ trong một đêm.

Best Practices

Tài liệu tham khảo

Part of the DevSecOps Roadmap knowledge base.

Overview

Network security is the layer of defense-in-depth that controls how traffic is allowed to move — between the internet and your systems, between zones inside your environment, and between individual workloads. In a DevSecOps context, network security is not just a perimeter concern owned by a networking team; it is expressed as code (security groups, network policies, firewall rules) that lives in the same repositories and pipelines as application code, and it is increasingly built around Zero Trust rather than a trusted internal network behind a hardened perimeter.

This note focuses on the concepts and decisions a DevSecOps engineer needs: what firewalls, IDS/IPS, and ACLs do and how to reason about their rules; how to design network zones and segmentation so a breach in one place doesn’t become a breach everywhere; how to think about and mitigate DDoS attacks; and how Zero Trust Architecture reframes network security around identity and continuous verification instead of location. For the deeper device-level mechanics of firewalls, ACLs, and IDS/IPS (packet flow, stateful inspection internals, Cisco-style ACL syntax, VLAN hopping, ARP poisoning, etc.), see Network Engineer — Network Security, which covers this from a network engineering perspective. This note builds on that foundation and applies it to how modern, cloud-native, pipeline-driven organizations design and operate networks securely.

This is defensive security education: the goal is to understand these controls well enough to design, configure, and audit them correctly — not to bypass them.

Fundamentals

Firewalls — a brief recap

A firewall enforces a policy of what traffic is permitted to cross a boundary. Three generations matter for a DevSecOps engineer to recognize:

TypeInspectsStatefulnessTypical use today
Packet-filteringIP/port/protocol headers only, per packetStateless — each packet judged in isolationRare standalone; underlies simple ACLs and cloud NACLs
Stateful inspectionHeaders + connection state (tracks the TCP/UDP session)Stateful — only need to allow the initiating direction, return traffic auto-permittedCloud security groups, most on-prem firewalls, host firewalls (iptables/nftables, Windows Firewall)
Next-Generation Firewall (NGFW)Headers, state, and payload — application/user identity, TLS-inspected content, embedded IPS, threat intelligenceStateful + deep packet inspectionPerimeter/edge, internal segmentation firewalls, cloud-native equivalents (AWS Network Firewall, Azure Firewall Premium)

In cloud environments, the everyday equivalent of a stateful firewall is the security group (stateful, applied at the instance/ENI level) paired with a network ACL (stateless, applied at the subnet boundary) — see the Cloud notes for provider-specific details. The key operational point for DevSecOps: firewall rules should be defined as code (Terraform, CloudFormation, Kubernetes NetworkPolicy) and go through the same review/CI process as application code, not be edited by hand in a console.

IDS vs IPS

Both Intrusion Detection Systems and Intrusion Prevention Systems analyze traffic for malicious patterns; the difference is what happens once something suspicious is found.

AspectIDS (Intrusion Detection System)IPS (Intrusion Prevention System)
PlacementOut-of-band, monitors a copy of traffic (via SPAN/mirror port or tap)Inline, sits directly in the traffic path
Action on detectionAlerts only — logs, raises an alarm, notifies SOC/SIEMCan actively block, drop the packet, reset the connection, or quarantine the source
Impact of a false positiveNoisy alert, no service disruptionCan drop legitimate traffic — availability risk if tuned poorly
Performance overheadLower (analysis happens on a copy)Higher (must inspect and decide in real time, adds latency)
Failure modeFails open by nature (traffic already passed)Must be explicitly configured fail-open vs fail-closed

Detection methods (apply to both IDS and IPS):

NIDS vs HIDS: a Network IDS/IPS (Suricata, Snort, Zeek) watches traffic on the wire at a chokepoint (span port, inline tap); a Host IDS/IPS (OSSEC, Wazuh, Falco for containers) watches activity on a single host or container — file integrity, process execution, syscalls. In a DevSecOps pipeline, HIDS-style tools running as sidecars or DaemonSets (e.g., Falco in Kubernetes) are often more relevant than classic network taps, because east-west traffic inside a cluster or overlay network is invisible to a perimeter NIDS.

ACLs (Access Control Lists)

An ACL is an ordered list of permit/deny rules matched against traffic characteristics. Two core forms:

TypeMatches onGranularityTypical placement
Standard ACLSource IP address onlyCoarseClose to the destination (since it can’t filter by service/destination)
Extended ACLSource IP, destination IP, protocol, source/destination portFine-grainedClose to the source (filter traffic as early as possible)

Three rules to internalize:

  1. Order matters — rules are evaluated top-to-bottom, and the first match wins; a broad “deny” placed above a specific “permit” silently blocks the permit and never gets reached.
  2. Implicit deny — nearly every ACL implementation ends with an invisible “deny all” after the last explicit rule. If nothing matches, the traffic is dropped. This is the practical expression of default-deny / least privilege at the network layer.
  3. Direction — ACLs are applied per-interface, per-direction (inbound vs outbound); the same list of rules can mean something very different depending on which direction it’s bound to.

Example extended ACL (Cisco IOS syntax) allowing HTTPS to a web tier from anywhere, SSH only from a management subnet, and denying everything else:

ip access-list extended WEB-TIER-IN
 permit tcp any host 10.0.1.10 eq 443
 permit tcp 10.0.100.0 0.0.0.255 host 10.0.1.10 eq 22
 deny   ip any any log
!
interface GigabitEthernet0/1
 ip access-group WEB-TIER-IN in

Equivalent intent expressed as a Kubernetes NetworkPolicy (default-deny namespace, then explicit allows) — the cloud-native, pipeline-friendly analogue of the ACL above:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: default-deny-all
  namespace: web-tier
spec:
  podSelector: {}
  policyTypes: ["Ingress", "Egress"]
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-https-from-anywhere
  namespace: web-tier
spec:
  podSelector:
    matchLabels: { app: web }
  policyTypes: ["Ingress"]
  ingress:
    - from: []
      ports:
        - protocol: TCP
          port: 443

Notice the same three principles apply: an explicit default-deny, narrowly scoped allow rules, and evaluation that is additive (Kubernetes NetworkPolicy rules are OR’d together — there’s no “first match wins” ordering the way Cisco ACLs have, which is a meaningful difference to be aware of when translating one model to the other).

For deeper ACL syntax, wildcard masks, and per-device configuration mechanics, see Network Engineer — Network Security § ACLs.

Key Concepts

Network segmentation and secure zoning

Segmentation divides a network into isolated zones so that compromising one zone does not automatically grant access to every other zone — it limits an attacker’s blast radius and slows or stops lateral movement.

Zone/techniquePurposeExample
DMZ (demilitarized zone)Hosts systems that must be reachable from the internet, isolated from the trusted internal networkPublic-facing web servers, reverse proxies, mail gateways
Internal zonesGroup internal systems by trust level or function so cross-zone traffic must pass a policy enforcement pointUser VLAN, server/app VLAN, database VLAN, management VLAN
MicrosegmentationFine-grained, often per-workload policy enforcement — down to individual pods, containers, or VMs — regardless of physical/network topologyKubernetes NetworkPolicy, cloud security groups per service, service mesh mTLS + authorization policy (Istio, Linkerd)

Why segmentation matters so much in practice: most serious breaches are not “attacker gets into one server and it’s over” — they are a chain: initial foothold (e.g., a vulnerable web app in the DMZ) → lateral movement (to a database or internal admin system) → privilege escalation → exfiltration. Segmentation breaks this chain at the second step. Without it, a single compromised container can often reach every other service in a flat network; with proper microsegmentation, that same container can only reach the specific services its NetworkPolicy/security group explicitly allows — everything else is an implicit deny.

Segmentation design guidelines:

DDoS mitigation strategy

A Distributed Denial of Service (DDoS) attack aims to exhaust a target’s availability — bandwidth, connection state, or application capacity — using traffic from many distributed sources. Effective mitigation depends on recognizing which layer is being attacked.

Attack categoryOSI layerWhat it exhaustsExamplePrimary mitigation
VolumetricL3/L4Network bandwidthUDP/ICMP floods, DNS/NTP amplificationAnycast + scrubbing centers, upstream ISP/cloud DDoS protection service, blackholing extreme sources
ProtocolL3/L4Server/network device connection-state tablesSYN flood, ping of death, fragmented packet attacksSYN cookies, stateful firewall connection limits, rate limiting at the edge
Application-layerL7Application/backend compute or database capacityHTTP flood, slow POST (Slowloris), API abuse against expensive endpointsWAF rules, rate limiting per client/IP/API key, CAPTCHA/challenge pages, caching (CDN), request validation

Core mitigation techniques, used in combination:

A DDoS response plan (part of incident response) should define: who declares an incident, which mitigation layer engages automatically (CDN/WAF rules) vs. requires a human decision (contacting an upstream scrubbing provider), and how to communicate status during the event.

Zero Trust Architecture (NIST SP 800-207)

Zero Trust flips the traditional network security model. Traditional “castle-and-moat” perimeter security assumes that anything inside the network boundary is relatively trustworthy — once a device or user is on the internal network, it can typically reach a wide range of other resources with comparatively little additional friction. Zero Trust assumes the opposite: no user, device, or network location is trusted by default, no matter where the request originates from — every request must be authenticated, authorized, and encrypted, continuously, based on identity and context rather than network location. This is captured in the slogan “never trust, always verify.”

Core principles from NIST SP 800-207:

  1. All data sources and computing services are considered resources — every resource requires access control, without exception for being “internal.”
  2. All communication is secured regardless of network location — being on the corporate LAN grants no implicit trust; traffic is encrypted and authenticated the same whether it originates internally or externally.
  3. Access to individual resources is granted per-session — trust is evaluated and granted for a single session/request, not persistently for a device or user once authenticated.
  4. Access is determined by dynamic policy — evaluated based on identity, device posture/health, behavioral attributes, and environmental context (time, location, threat intelligence), not just a static role.
  5. The enterprise monitors and measures the integrity and security posture of all owned and associated assets — device health/patch status feeds into access decisions.
  6. All resource authentication and authorization are dynamic and strictly enforced before access is allowed — continuous re-evaluation, not “authenticate once, trust forever.”
  7. The enterprise collects as much information as possible about the current state of assets, network infrastructure, and communications and uses it to improve its security posture — logging and telemetry feed back into policy.

Architectural components (NIST 800-207 model):

Together, PE + PA are often referred to as the Policy Decision Point (PDP) as a pair, contrasted with the PEP that sits closer to the resource.

Key mechanisms that implement Zero Trust in practice:

Defense-in-depth applied to network design

Zero Trust does not replace firewalls, IDS/IPS, or segmentation — it is the organizing principle that ties them together with identity as the connective layer. A well-designed network applies all of these together, layered:

Defense in depth, from the Internet inward
  1. Layer 1
    Edge / CDN / WAFPerimeter: NGFW/WAF, DDoS scrubbing, anycast
  2. Layer 2
    DMZpublic-facing services, reverse proxies
  3. Layer 3
    Internal core networkSegmentation: internal zones, VLANs/subnets, NACLs; reached through a policy enforcement point — extended ACL / stateful FW
  4. Layer 4
    Users and ServicesMicrosegmentation: per-workload NetworkPolicy / security groups / service-mesh mTLS
  5. Layer 5
    PEPper-service policy enforcement point — sidecar/gateway. Zero Trust identity layer: every request authenticated and authorized regardless of which zone it came from
  6. Layer 6
    ResourceDetection: IDS/IPS (NIDS at chokepoints, HIDS per host/container), centralized logging to SIEM

Each layer assumes the ones “outside” it can fail: the perimeter firewall might be misconfigured, a DMZ host might get compromised, an attacker might obtain valid-looking credentials — Zero Trust’s continuous, identity-based verification at every hop is what limits how far that single failure can propagate, and IDS/IPS plus centralized logging is what turns “we were breached” into “we detected it in minutes, not months.” This directly extends the defense-in-depth model from the DevSecOps Introduction into the network layer specifically.

Traditional perimeter security vs. Zero Trust

DimensionTraditional perimeter (“castle-and-moat”)Zero Trust
Trust basisNetwork location (inside = trusted, outside = untrusted)Identity and context (user, device, workload) — location is not a trust signal
PerimeterA single hardened boundary (firewall at the edge)No single perimeter; every resource enforces its own boundary (PEP)
Internal trafficLargely trusted once past the perimeter (flat internal network)Authenticated and authorized on every request, encrypted in transit
Access granularityBroad — VLAN/subnet-level access once connectedFine-grained — per-resource, per-session, least-privilege
Remote access modelVPN — places the remote user “on the network”ZTNA — brokers access to individual applications, user never joins the network
Lateral movement riskHigh — compromise of one host often exposes many othersLow — microsegmentation and per-request auth limit reachable resources
Policy basisStatic rules (IP/subnet/port)Dynamic policy (identity, device posture, behavior, risk signals)
Failure modeSingle point of failure — breach the perimeter, reach everything insideDefense-in-depth by design — compromising one credential/session doesn’t grant broad access
Where enforcedNetwork edge devicesDistributed — every service/workload boundary

Zero Trust does not mean “no network security” or “no firewalls” — segmentation, ACLs, IDS/IPS, and perimeter defenses are all still present; Zero Trust adds a mandatory identity-and-context check at every hop instead of relying on network position as an implicit trust signal. In practice, most organizations migrate to Zero Trust incrementally, layering identity-aware proxies and microsegmentation onto an existing segmented network rather than replacing it overnight.

Best Practices

References