Chapter 4. Corporate network security and remote access (Enterprise: ZTNA & VPN rollout)
Learning objectives
- Explain the risks of lateral movement (Lateral Movement) inherent in traditional perimeter-based VPNs (Castle-and-Moat model), and compare them with the core principles of the NIST SP 800-207 Zero Trust Architecture (PE, PA, and PEP).
- Explain the operating principles of outbound-only connectors (
cloudflaredCloudflare Tunnel), which do not open even a single inbound firewall port, and design high-availability configurations for them. - Explain the separation of control plane and data plane, direct connections (NAT Traversal) and DERP relays, subnet routers (Subnet Router), and least-privilege ACLs in WireGuard-based mesh VPNs (such as Tailscale).
- Diagnose split tunneling (Split Tunneling: include versus exclude modes) and address conflict issues with home router subnets (RFC 1918 ranges such as
192.168.x.x) during company-wide endpoint rollouts, and establish solutions for them. - Design split-horizon DNS (Split-Horizon DNS) and conditional forwarders to prevent internal-only domains from being exposed to external public DNS.
- Enforce access conditions by combining IdP integration (SSO, MFA, and automated SCIM account deprovisioning) with device posture checks (OS patch status, disk encryption, and MDM/EDR).
- Configure developer laptops so that CLI tools and coding agents (
NODE_EXTRA_CA_CERTS,SSL_CERT_FILE) operate properly when distributing an internal ZTNA TLS inspection root CA certificate, without disabling security through settings such asNODE_TLS_REJECT_UNAUTHORIZED=0.
Introduction
The real treasures of a company building AI services do not exist solely on public-facing websites intended for customers. The internal staging databases that developers connect to every single day, the internal administrative tools containing prompts and evaluation datasets, self-hosted vLLM/Ollama inference servers, the internal corporate wiki, and deployment pipeline dashboards all reside strictly inside the corporate network. How should developers working from home, outsourced data labelers, and product managers on overseas business trips be enabled to access these internal corporate assets?
The laziest possible approach is to assign public IP addresses to internal servers, leave ports (SSH 22, DB 5432, web 8080) wide open on the firewall, and protect them with nothing more than passwords. This is virtually indistinguishable from broadcasting an advertisement to automated scanners across the entire world: "Please hack our server." The next most common approach is the traditional perimeter-based VPN (Virtual Private Network), which has been in widespread use for more than twenty years. In this model, a single VPN hardware appliance is placed on the corporate perimeter firewall, and when an employee connects using a VPN client, the appliance assigns them an internal corporate network IP address.
However, one day, an outsourced contractor's personal laptop connected to the corporate VPN while infected with malware. Because the existing VPN treated anyone who passed the initial VPN login as "one of the family who has entered inside the corporate network," the attacker was able to move laterally across the internal network with complete freedom (lateral movement, Lateral Movement), probing and infiltrating all the way into finance department file servers and production database ports that the contractor had no legitimate reason to access, ultimately taking complete control of the company. To make matters worse, when the security team rolled out next-generation ZTNA agents across all company laptops in bulk to prevent this, the next morning, developers across the board cried out in protest: "My home Wi-Fi printer is not working!", "Internal company domains will not open!", "Claude Code, npm install, and python have all ground to a complete halt with UNABLE_TO_GET_ISSUER_CERT_LOCALLY certificate errors!"
This chapter provides direct answers to precisely these two questions: "How can we protect internal corporate resources with least privilege without opening even a single inbound port?" and "How can we cleanly and completely resolve the network, DNS, and certificate conflicts that erupt when introducing and installing VPN and ZTNA solutions across the endpoint devices of developers and employees in an actual organization?"
Key concepts
Limitations of traditional perimeter VPNs and Zero Trust (NIST SP 800-207)
Traditional network security followed the Castle-and-Moat model. It operated on the assumption that the external internet outside the enterprise was a dangerous realm, whereas the internal corporate network (VPC, corporate office LAN) inside the perimeter was a safe sanctuary within the castle walls. Remote workers presented their identification at the castle gate (the VPN gateway) and walked right into the castle interior.
There are three primary reasons why this model collapsed:
- Excessive implicit trust and lateral movement (Lateral Movement): Once passing through the castle gate (the VPN) a single time, the user's endpoint device is integrated directly into the corporate network layer (L3/L4) itself. Even if a marketing intern only needs to look at a single web dashboard, they can scan and probe the SSH ports or database ports of development servers located on the very same subnet. If even a single account is compromised, the entire interior of the castle is breached.
- The inbound attack surface of the VPN appliance itself: In order to accept remote incoming connections, the VPN appliance must continuously keep public IP addresses and inbound ports (e.g., UDP 500/4500, TCP 443) wide open facing the public internet. In reality, a substantial portion of the most catastrophic corporate security breaches over recent years occurred through zero-day vulnerabilities in legacy VPN appliances.
- Hairpinning bottlenecks in the era of cloud computing and remote work: Corporate assets are already dispersed across the AWS Seoul region and the GCP Tokyo region, but funneling all employee network traffic through a physical VPN appliance located at the headquarters office before routing it back out to the cloud (backhauling, Backhauling) severely degrades throughput, increases latency, and turns the VPN appliance into a single point of failure (SPOF).
To overcome these fundamental limitations, the SP 800-207 (Zero Trust Architecture) standard published by the National Institute of Standards and Technology (NIST) defines the central tenet of Zero Trust as follows:
"No implicit trust (Implicit Trust) is granted to any subject based solely on physical network location or logical network addressing (such as possessing an internal network IP address). All access is authorized strictly on an individual resource (application and service) level rather than across the network as a whole, continuously evaluating identity, device health posture, and contextual signals for every single session, and granted solely under the principle of least privilege."
NIST SP 800-207 explains Zero Trust systems using three logical components:
| NIST SP 800-207 component | Role | Practical implementation example |
|---|---|---|
| Policy Engine (PE) | The central brain that synthesizes user identity (IdP), device health posture (MDM/EDR), time, location, and contextual risk signals to render the definitive judgment: "Allow or deny this request?" | Cloudflare Access policy evaluator, Tailscale/Okta policy decision engine |
| Policy Administrator (PA) | Responsible for issuing commands (generating or revoking tokens, session credentials, and cryptographic keys) to enforcement points to establish or terminate actual communication paths based on decisions from the Policy Engine | ZTNA control plane, coordination server |
| Policy Enforcement Point (PEP) | The gateway situated directly between user endpoints and resources that intercepts packets and connections, allowing only verified and authorized sessions to pass through | Edge ZTNA proxy, cloudflared connector, WireGuard peer interface |
A comprehensive side-by-side comparison between traditional VPNs and Zero Trust Network Access (ZTNA) is summarized below:
| Comparison criterion | Traditional perimeter-based VPN | Zero Trust Network Access (ZTNA) |
|---|---|---|
| Access grant unit | Entire network or subnet (e.g., granting entry to the entire 10.10.0.0/16 range) |
Individual application, host, and port level (e.g., permitting only HTTPS to admin.internal) |
| Lateral movement risk | High (adjacent servers and services can be freely scanned once inside the internal network) | Extremely low (unauthorized resources are completely hidden and their very existence cannot be detected) |
| Inbound firewall ports | Mandatory opening of public IP addresses and inbound ports on the VPN gateway appliance | 0 open inbound ports when utilizing outbound-only secure tunnels |
| Verification timing and criteria | A single, one-time check of user ID/password (and OTP) upon initial tunnel establishment | Continuous verification of SSO identity + MFA + device security health posture (Device Posture) on every single resource request |
Outbound-only connectors: cloudflared (Cloudflare Tunnel) and eliminating inbound ports
How should firewall inbound ports be configured in order to expose internal administrative web applications (http://localhost:8080) or development SSH servers running inside an on-premises datacenter or private cloud VPC exclusively to authorized external employees? The correct answer is: "Do not open even a single inbound port."
How is it possible for external traffic to reach an internal system when not a single inbound port is open? The secret lies in reversing the direction of connection establishment (Outbound-only Connector). The premier example of this paradigm is Cloudflare's cloudflared (Cloudflare Tunnel).
Let us walk through the operational mechanics step by step:
- The firewall (or Security Group) of the internal corporate server (or container inside a private subnet) leaves all inbound rules completely empty (Inbound allow: none). Instead, it permits strictly outbound traffic (Outbound, destination ports 443/7844 over QUIC or HTTP/2) heading out to the external internet.
- When the lightweight daemon
cloudflaredis executed inside the internal corporate server,cloudflaredproactively reaches out from inside the corporate network toward the outside (connecting to multiple nearby Cloudflare edge datacenters), establishes four encrypted outbound tunnel connections, and maintains them in a ready state. - Now, an external employee navigates to
https://staging-admin.example.comin their web browser. - The request arrives first at the Cloudflare edge (Cloudflare Access, functioning as the PEP). Cloudflare first validates whether this employee has authenticated through the corporate IdP (such as Google Workspace, Okta, etc.), and whether they have satisfied MFA and device posture criteria.
- Only legitimate requests that successfully pass this multi-layered inspection are routed down through the very outbound tunnel that the internal
cloudflaredconnector had already established from the inside out, directly delivering the request tohttp://localhost:8080on the internal server!
The security and operational advantages afforded by this architecture are immense:
- Complete elimination of public IP addresses and inbound ports: Internal servers operate seamlessly without possessing any public IP address at all (even when deployed within a completely private subnet behind a NAT gateway). Because there are 0 open ports that can be scanned from the public internet, external port scans and direct volumetric DDoS attacks become physically impossible.
- Pre-authentication: Packets originating from unauthenticated attackers are dropped immediately at the Cloudflare edge, meaning they never even reach the web application frameworks or TCP stacks of the internal servers.
- High-availability (HA) configuration: Because an active tunnel would drop if a single
cloudflareddaemon process terminates, in production environments and critical corporate networks, high-availability zero-downtime redundancy is achieved by running two or morecloudflaredreplicas (connectors) executing the identical tunnel configuration across different Availability Zones (AZs) or across two or more separate physical/virtual hosts.
Mesh VPNs (WireGuard and Tailscale): Subnet routers, DERP relays, and least-privilege ACLs
While web applications or individual hosts are ideally suited for publication via reverse-proxy ZTNA such as Cloudflare Tunnel, when software developers need to connect from their local IDEs to multiple distributed microservices, internal gRPC endpoints, development Kubernetes clusters, and internal machine learning inference nodes with ultra-low latency as if they were sitting on the very same physical office LAN, modern WireGuard-based mesh overlay networks (such as Tailscale, Netbird, etc.) demonstrate outstanding capabilities.
The architectural contrast between traditional centralized VPNs (Hub-and-Spoke) and modern mesh VPNs is distinct and clear:
| Classification | Traditional centralized VPN (OpenVPN/IPsec appliances) | Modern WireGuard mesh VPN (Tailscale, etc.) |
|---|---|---|
| Traffic routing path | Every single packet must traverse a single central VPN gateway (creating severe performance bottlenecks) | The centralized server manages only the control plane (cryptographic key exchange and policy distribution), while actual encrypted data packets travel via 1:1 direct peer-to-peer (Peer-to-Peer) communication between the endpoint and the destination server |
| Cryptographic protocol | Heavy, complex legacy negotiations | Modern lightweight cryptography using WireGuard (in-kernel or high-performance userspace, seamless connection roaming) |
| IP allocation scheme | Ephemeral private IP address pools (10.8.0.x) that change dynamically upon every connection |
A permanent, unique IP assigned from the CGNAT address space (100.64.0.0/10) for each individual device and node, paired with automatic MagicDNS naming |
When deploying a mesh VPN in enterprise production, there are three fundamental architectural mechanisms that must be thoroughly understood:
- NAT traversal (NAT Traversal) and DERP relay fallback: Even when two nodes are both situated behind separate consumer routers or firewalls (NAT), they establish a direct point-to-point UDP connection by punching holes through the firewall state tables using STUN/ICE techniques (UDP Hole Punching). In scenarios where strict corporate firewalls, hotel networks, or coffee shop Wi-Fi completely block outbound UDP traffic, preventing a direct peer-to-peer link, the connection is not dropped; instead, it seamlessly falls back to routing traffic through an encrypted HTTPS (TCP 443)-based relay server (DERP, Designated Encrypted Relay for Packets) while preserving full end-to-end encryption. Even during relaying, because only the two communicating endpoints hold the end-to-end WireGuard cryptographic private keys, the DERP relay server itself is mathematically incapable of inspecting the plaintext contents of any packet.
- Subnet router (Subnet Router, bastion bridge): Native VPN agent software cannot be directly installed on managed database services such as AWS RDS, legacy appliances, or internal network hardware printers. In such environments, by provisioning a small Linux virtual machine (or container) inside the same VPC private subnet, designating it as a subnet router, and having it advertise exclusively the database subnet range (e.g.,
10.50.10.0/24) using--advertise-routes=10.50.10.0/24, even agentless RDS endpoints can be reached securely and transparently across the mesh network (for high availability, subnet routers should also be deployed across two or more instances). - Tag- and role-based least-privilege ACLs (Access Control Lists): If every node is permitted to communicate freely with every other node simply because they are joined to the mesh VPN, the catastrophic lateral movement vulnerabilities of traditional VPNs will resurface. Consequently, the baseline security posture must be set to default deny (Default Deny), and JSON/HuJSON code is utilized to rigorously define who (Source) can access which specific port (Port) on which designated tag (Destination), mapped against identity provider groups and server tags (
tag:staging-db,tag:gpu-worker). The code snippet below illustrates the traditionalaclsformat that has been predominantly used. Tailscale now establishes grants as the officially recommended paradigm and categorizesaclsas legacy syntax. New rules should be authored using grants, while pre-existingaclscan remain within the same unified policy configuration file and be transitioned incrementally.
{
"acls": [
{
"action": "accept",
"src": ["group:backend-devs"],
"dst": ["tag:staging-db:5432", "tag:ai-inference:8000"]
},
{
"action": "accept",
"src": ["group:security-admins"],
"dst": ["tag:prod-bastion:22"]
}
]
}
With access control rules declared in this declarative manner, backend developers can transmit packets strictly to port 5432 of the staging database and port 8000 of the AI inference cluster; their packets cannot even touch port 22 of the production bastion host or the personal laptops of fellow employees situated on the same virtual overlay network.
Split tunneling (Split Tunneling) and resolving home router range (RFC 1918) conflicts
On the very first day of rolling out an enterprise VPN/ZTNA client to all employee laptops across an organization, the single most common root cause behind an overwhelmed and paralyzed IT help desk is mistakes in network routing range design and split tunneling (Split Tunneling) configuration.
Tunnel routing mechanisms are broadly categorized into two distinct architectures:
- Full tunneling (Full Tunnel): Routes every single byte of outbound internet traffic (
0.0.0.0/0) leaving an employee's laptop through the corporate VPN gateway or centralized secure web gateway (SWG). While this provides absolute administrative visibility and strict security filtering, it causes corporate network bandwidth to explode and induces severe latency, as all personal employee web browsing, video conferencing streams (such as Zoom), and multi-gigabyte Docker image downloads are forced through the central corporate gateway. - Split tunneling (Split Tunnel): Directs only traffic explicitly bound for designated internal corporate resources into the encrypted tunnel, while bifurcating general external internet traffic so that it routes directly out over the employee's local ISP connection. There are two primary configuration modes:
- Include mode (Include Mode): Explicitly routes only specified corporate IP CIDR blocks (e.g.,
10.200.0.0/16) or internal fully qualified domain names through the tunnel, while discharging all other network traffic locally. This is the cleanest, most resilient configuration with minimal risk of subnet collision when accessing private corporate resources is the primary objective. - Exclude mode (Exclude Mode): Routes traffic through the secure tunnel by default, while explicitly carving out and excluding only specified subnets, such as the local residential LAN range or dedicated video conferencing IP blocks, from entering the tunnel.
- Include mode (Include Mode): Explicitly routes only specified corporate IP CIDR blocks (e.g.,
The notorious and treacherous trap that bedevils network practitioners here is none other than overlapping RFC 1918 private IP subnet collisions (Overlapping Subnet Collision)!
Suppose a company, when provisioning its corporate cloud VPC, thoughtlessly selected 192.168.0.0/16 or 192.168.1.0/24 (or the overly broad and ubiquitous 10.0.0.0/8 in its entirety) as its corporate VPC CIDR block and registered it in the VPN split-tunnel include list. The vast majority of residential Wi-Fi routers, coffee shop access points, and mobile smartphone hotspots utilized by remote developers also default to using 192.168.0.0/24 or 192.168.1.0/24 (with the default gateway located at 192.168.1.1)!
As a direct consequence, the exact moment the employee toggles on their VPN client, one of two catastrophic scenarios unfolds:
- If the more specific local physical subnet route takes precedence inside the laptop operating system's kernel routing table, packets dispatched by the developer destined for the corporate database server (
192.168.1.50) will fail to enter the VPN tunnel; instead, they are routed straight to the wireless router or smart television sitting in the developer's living room, failing to connect entirely. - Conversely, if the VPN client software aggressively intercepts and hijacks
192.168.1.0/24, network connections to the developer's residential wireless printer, home network-attached storage (NAS), and local hardware development testbeds are severed completely, or all network communication with their home router gateway is lost entirely.
Therefore, when architecting enterprise corporate infrastructure and designing VPN/ZTNA rollouts, the following three fundamental principles for preventing subnet collisions must be strictly enforced:
| Principle | Flawed design (triggers collisions) | Correct practical engineering design |
|---|---|---|
| 1. Selection of corporate VPC CIDR | Selecting residential consumer router defaults such as 192.168.0.0/24, 192.168.1.0/24, 10.0.0.0/24, or routing all of 10.0.0.0/8 wholesale |
Allocating non-conflicting, higher/uncommon private subnets that never overlap with residential consumer routers (e.g., 10.240.0.0/16, 172.28.0.0/16), sized strictly to the necessary operational capacity |
| 2. Scope of split tunnel inclusion | Hijacking the entire 10.0.0.0/8 block into the VPN tunnel for administrative laziness even though corporate hosts occupy only a single /24 |
Registering strictly the exact, granular CIDR block where corporate resources genuinely reside (10.240.10.0/24) in Include mode |
| 3. Connecting legacy networks with pre-existing overlapping address spaces | Issuing an administrative notice demanding all employees manually reconfigure their home router settings (impossible in practice) | Bypassing direct L3 IP routing entirely by deploying domain-based ZTNA reverse proxies (Cloudflare Tunnel), CGNAT (100.64.0.0/10) virtual overlay address mapping, or subnet address translation (NAT/4via6) |
Split-horizon DNS (Split-Horizon DNS) and preventing internal domain exposure
Suppose the hostname of an internal development staging database is db.staging.internal.example.com (with a private IP address of 10.240.10.15). In order to make this domain easy for employees to remember, is it acceptable practice to register it directly as A 10.240.10.15 in a public DNS zone (such as an AWS Route 53 Public Hosted Zone) where anyone on the global internet can query it?
This is strictly discouraged and never recommended. If internal server hostnames and private IP addressing schemes are published in public DNS records, external malicious actors can map out the existence of mission-critical internal systems such as git-internal, payroll-db, and vllm-gpu-01, along with the complete internal network topology and subnet architecture, as clearly as looking at the palm of their hand through DNS zone enumeration (Zone Enumeration) or Certificate Transparency logs (information disclosure during the reconnaissance phase).
The established solution is split-horizon DNS (Split-Horizon DNS, or Split-Brain DNS). This is an architectural technique that bifurcates or alters DNS query responses depending on who is issuing the query (specifically, through which network pathway the query originates).
- Isolating internal-only hosted zones: Register
*.internal.example.comresource records strictly inside an AWS Route 53 Private Hosted Zone (which resolves queries exclusively within designated VPC boundaries) or within private corporate DNS resolvers. When an external client queries this domain from the public internet,NXDOMAIN(non-existent domain) is returned. - Configuring conditional DNS forwarding on ZTNA/VPN clients (Conditional DNS Forwarding / Split DNS): Configure the endpoint ZTNA/VPN client installed on the remote employee's laptop with the rule: "Route only DNS queries ending in the suffix
*.internal.example.comthrough the encrypted tunnel to the internal corporate DNS resolver (e.g.,10.240.0.2), while forwarding all other standard public domain queries (google.com,naver.com) directly to the employee's existing local default DNS resolver."
When configured in this manner, only authorized employees properly authenticated into the corporate network can resolve internal corporate domain names into private IP addresses, the internal hostnames themselves remain completely invisible to the external internet, and the DNS resolution latency for general day-to-day web browsing is not degraded in the slightest.
IdP integration (SSO/MFA) and automated deprovisioning of departing employees via SCIM
When deploying a corporate VPN or ZTNA solution, "publishing shared generic VPN credentials (vpnuser / company1234!) or distributing a universal .ovpn configuration profile on an internal company wiki for all staff to download and share" represents an absolute abdication of enterprise security. It becomes completely impossible to audit who accessed which resource at what time, and unless every single employee's VPN password is reset every time a single team member departs, that former employee will retain the ability to penetrate the corporate network from home indefinitely.
Therefore, enterprise remote access infrastructure must be inextricably coupled with a centralized IdP (Identity Provider: Okta, Google Workspace, Microsoft Entra ID, etc.) as a single cohesive unit. Connecting user identities must be rigorously verified using OIDC- or SAML-based SSO (Single Sign-On) combined with phishing-resistant MFA (WebAuthn passkeys, hardware security keys). Furthermore, the exact instant an employee departure or contract termination is logged within human resources (HR) or IdP systems, the SCIM (System for Cross-domain Identity Management) protocol must automatically deactivate the user's ZTNA/VPN account and immediately execute a forced revocation of all currently active tunnel sessions, cryptographic tokens, and leases.
Device posture (Device Posture) and enforcing endpoint security health
Just because a user's identity (Identity) is authenticated does not guarantee that the connecting device (Device) itself is trustworthy or secure. Even if an employee successfully logs in using their legitimate enterprise username and completes MFA verification, if the physical machine used to establish the connection is an unpatched shared home PC or a malware-infected laptop with its endpoint detection and response (EDR) agent disabled, the gates to the corporate network must never be unlocked.
Device posture (Device Posture) is an automated security evaluation mechanism whereby the ZTNA client continuously inspects the real-time security health status of an endpoint—both prior to permitting connection initiation and throughout the entire lifetime of an active session—and reports these telemetry signals to the Policy Engine (PE).
| Control axis | Mandatory components | Real-world threats mitigated |
|---|---|---|
| SSO and robust MFA | OIDC/SAML integration + phishing-resistant MFA (WebAuthn passkeys, hardware security keys) | Thwarts unauthorized remote access takeovers executed via leaked passwords or adversary-in-the-middle phishing portals |
| Automated SCIM provisioning and deprovisioning | Upon logging employee departure or leave of absence in HR/IdP systems, the SCIM protocol instantly and automatically deactivates ZTNA/VPN accounts and forcibly terminates active sessions | Fundamentally eliminates the grave risk of abandoned orphaned accounts (Orphaned Account) retaining persistent, unnoticed access to internal assets |
| Device posture (Device Posture) | Validates that endpoints exhibit up-to-date OS security patches, full disk encryption (FileVault/BitLocker), active screen locks, corporate MDM enrollment certificates, and active EDR (antivirus) execution prior to authorizing ingress | Prohibits access to internal corporate networks from unpatched personal computers or compromised machines, even when authenticating with valid employee credentials |
| Short session lifetimes and re-authentication | Enforcing strict tunnel token expiration windows (e.g., 12 to 24 hours) alongside mandatory step-up re-authentication when accessing ultra-sensitive resources (production databases, root SSH) | Curtails unauthorized access stemming from lost, stolen, or indefinitely unattended laptops with lingering active sessions |
Distributing endpoint root CA certificates and resolving TLS errors in developer CLI tools and coding agents
As many organizations adopt modern ZTNA and secure web gateways (SWG, e.g., Cloudflare Gateway TLS Inspection, Zscaler, etc.), they enable TLS decryption inspection (TLS Inspection) to scrutinize outbound HTTPS network traffic for data loss prevention (DLP) violations, exfiltration of confidential intellectual property, or command-and-control malware communication.
In this process, the security gateway operates as a man-in-the-middle, generating dynamically re-signed certificates for target websites using an internal corporate enterprise root CA (Enterprise Root CA) certificate and delivering them down to the client endpoint. Consequently, IT teams utilize enterprise MDM platforms (such as Jamf, Microsoft Intune, etc.) to distribute this "internal root CA certificate" as an explicitly trusted root authority into the macOS Keychain or Windows Certificate Store across all employee workstations. Mainstream graphical web browsers such as Google Chrome and Apple Safari natively read the operating system's underlying certificate store, so external web pages load transparently without throwing certificate warnings.
Why, then, does complete pandemonium erupt inside software developers' terminals?
This occurs because command-line runtimes and developer tools—including Node.js, Python (requests, urllib, pip), curl, git, Docker containers, and the AI coding agents running on top of them (such as Claude Code, Codex CLI, etc.)—in the overwhelming majority of cases do not consult the operating system's native system keychain, but instead place their trust solely in their own embedded, hardcoded CA bundle files (such as the Mozilla CA trust list)! Consequently, when a developer attempts to install software packages or execute an AI coding agent inside their terminal, the runtime evaluates the internal CA certificate presented by the corporate ZTNA gateway as an "unrecognized, forged certificate signed by an unknown authority," crashing abruptly with fatal errors such as UNABLE_TO_GET_ISSUER_CERT_LOCALLY or SELF_SIGNED_CERT_IN_CHAIN.
At this juncture, the single worst taboo and dangerous blunder that developers routinely commit after searching on web forums is resorting to the following configuration:
// Strictly prohibited! (Dangerous configuration that completely disables all TLS validation against man-in-the-middle attacks)
export NODE_TLS_REJECT_UNAUTHORIZED=0
git config --global http.sslVerify false
pip install --trusted-host pypi.org ...
curl -k https://...
The precise millisecond that NODE_TLS_REJECT_UNAUTHORIZED=0 or sslVerify false is toggled on, the runtime strips away all cryptographic defenses, blindly accepting not only the legitimate corporate CA certificate but also any fraudulent certificate injected by an attacker on an untrusted coffee shop public Wi-Fi network without asking any questions or performing any validation.
The correct and proper standard solution is not to disable TLS verification, but to formally add the "internal root CA certificate file (.pem)" to the recognized trust store of each respective runtime and CLI tool.
// Standard solution: Maintain strict TLS verification while adding the internal root CA (.pem) to the trust store
// 1) Node.js and Node-based AI coding agents ('add' the internal CA to the existing built-in CA list)
export NODE_EXTRA_CA_CERTS="/etc/ssl/certs/company-ztna-root-ca.pem"
// 2) Python (requests, pip, httpx) and OpenSSL/curl-based tools
// Caution: Because SSL_CERT_FILE and REQUESTS_CA_BUNDLE 'replace' the default bundle,
// specify a combined PEM file that merges the public root CA bundle with the internal root CA into one!
export SSL_CERT_FILE="/etc/ssl/certs/combined-ca-bundle.pem"
export REQUESTS_CA_BUNDLE="/etc/ssl/certs/combined-ca-bundle.pem"
export CURL_CA_BUNDLE="/etc/ssl/certs/combined-ca-bundle.pem"
// 3) Git client
git config --global http.sslCAInfo "/etc/ssl/certs/combined-ca-bundle.pem"
Here, there exists a critically important technical nuance that is essential both for certification examinations and day-to-day production engineering:
NODE_EXTRA_CA_CERTS, exactly as its name implies, appends (Extra) the internal corporate CA to Node's existing list of recognized public CAs, meaning that pointing this environment variable to the standalone internal CA certificate file alone is completely sufficient.- By contrast, environment variables such as
SSL_CERT_FILEorREQUESTS_CA_BUNDLEcompletely replace (Override) the entire default CA trust bundle; therefore, if you erroneously configure these variables to point to an isolated file containing solely the internal CA certificate, all standard outbound HTTPS traffic that bypasses the corporate gateway will abruptly break! For this reason, these specific variables must be pointed strictly to a combined unified bundle (combined-ca-bundle.pem) created by concatenating the internal root CA certificate directly onto the end of the existing standard public root CA bundle. Furthermore, proprietary external binaries that strictly enforce certificate pinning (Certificate Pinning) as well as official operating system update endpoints for Apple and Google should be registered under TLS inspection bypass rules (the Do Not Inspect list) within the centralized ZTNA administrative console to eliminate operational friction.
What changed in name versus what changed in recommendation: Cloudflare One Client and Tailscale grants
Whenever vendor technical documentation is revised, one must first carefully discern the fundamental nature of the change. There are scenarios where merely the naming has been rebranded, and scenarios where the underlying recommended architectural configuration model has officially shifted.
Cloudflare rebranded the official name of its endpoint WARP client to Cloudflare One Client. As of October 2026, the vendor's official documentation consistently uses this updated terminology. Its foundational functional role of securely tunneling endpoint network traffic to Cloudflare remains entirely identical. The split-tunneling decision criteria and the engineering principles of internal root CA certificate distribution detailed throughout this chapter remain completely unchanged as well. What has altered are solely the marketing moniker and the corresponding documentation URLs. If references to 'WARP' linger within internal enterprise deployment runbooks or IT help desk announcements, they should be updated to reflect the new designation.
Tailscale represents a change of an entirely different nature. Historically, the acls block within the central policy file served as the primary mechanism for declaring access control rules. Today, the vendor officially recommends grants and classifies traditional ACLs as legacy syntax. Categorization as legacy does not imply that existing production rules will suddenly cease functioning. Legacy ACLs continue to be fully supported, and they can seamlessly coexist alongside modern grants within one and the same policy definition file.
| Classification | Cloudflare One Client | Tailscale grants |
|---|---|---|
| Nature of change | Modification of terminology and documentation paths | Shift in recommended policy modeling paradigm |
| Existing configuration | Continues to operate completely as is | acls continues to be supported, coexisting with grants |
| Newly required action | Update product names across internal documentation and user announcements | Author newly introduced access rules utilizing grants |
Take the Sora Lab infrastructure team as an illustrative scenario. This team was operating approximately thirty lines of access rules authored in acls, and needed to add a new security rule for a cluster of GPU servers. There was no justifiable reason to scrap and overhaul the entire existing rulebase in a single day. The team authored the newly required rule using grants, while leaving the existing acls intact within the same policy file to be refactored incrementally one by one. The foundational tenets of default deny and least privilege remain completely invariant regardless of which syntactic format is adopted.
RPC ports on internal inference servers: Do not leave them open just because they are inside the internal network
Many engineering teams enable the RPC backend of llama.cpp in order to shard and distribute a single large language model across multiple physical GPU accelerator nodes. Because this represents an internal communication channel intended exclusively for inter-node communication, it is easy to succumb to the complacency of assuming that sitting inside the internal corporate network perimeter renders it safe. In Zero Trust architecture, it is precisely this complacent assumption that must be aggressively discarded from the very beginning.
The llama.cpp security advisory CVE-2026-34159 details a critical vulnerability that allows unauthenticated arbitrary remote code execution within the RPC backend engine. If the buffer field of a tensor structure is set to 0, the function deserialize_tensor() bypasses all memory bounds checking entirely. The affected scope encompasses build b7991 and earlier, and as of March 2026, the official security advisory does not specify a patched release version. This implies that the vulnerability cannot be remediated simply by bumping the software version. Furthermore, the SECURITY.md file of the upstream llama.cpp repository explicitly warns administrators never to deploy or expose the RPC backend in untrusted environments or unverified networks.
The architectural decision criterion hinges entirely upon the scope of endpoints capable of reaching that RPC port. The laptops of general employees connected to the corporate mesh VPN, external contractor workstations, and the entire address space advertised by internal subnet routers all fall squarely within that reachable scope. If even a single endpoint among that multitude cannot be definitively trusted, then that entire network environment must be classified as an untrusted network.
Let us examine the practical case of Hangyeol AI. The engineering team had attached tag:gpu-worker across four dedicated GPU nodes and had left every single port under this tag wide open to the entire machine learning model team. This was a precarious architecture wherein, if even a single developer laptop were compromised with malware, the entire fleet of inference nodes could be hijacked through the exposed RPC port. The team remediated this by restricting user groups to access only the HTTP inference API port, and relocated all inter-node RPC communications to an isolated, dedicated private subnet accessible strictly between the GPU nodes themselves. Furthermore, on standalone nodes where distributed multi-GPU inference was unnecessary, they disabled the RPC backend completely.
Token ownership and lifespan: MCP authorization and Vercel OIDC federation
When integrating an MCP server with an AI coding agent, one must first determine where authentication credentials originate and precisely where they are flowing. As of November 2026, authorization is defined as an optional capability under the latest Model Context Protocol (MCP) specification. There is an established standard that HTTP-based servers follow when implementing authorization flows, whereas implementations utilizing STDIO transport are explicitly instructed that they SHOULD NOT implement this specification and should instead ingest credentials directly from their surrounding environment. For an STDIO server spawned as a local child process, passing secrets via standard environment variables—just as CA file paths were passed earlier—fully complies with the architectural specification.
Even within a specification that classifies authorization as optional, there exists a strict normative prohibition with zero exceptions: an MCP server MUST NOT accept or pass along tokens that were not explicitly minted for itself. An architectural configuration wherein an MCP server blindly receives a GitHub access token dispatched by a client and flows it directly into the upstream GitHub API constitutes a classic case of "token pass-through". Doing this irrevocably obfuscates for whom the cryptographic token was originally issued, making it virtually impossible to distinguish the true invoking principal within enterprise audit logs.
The identical architectural principle governs scenarios where serverless edge functions access cloud backends. Vercel's OIDC federation is available across all pricing tiers, and the identity issuer mode can be selected between Team (officially recommended) and Global. However, cryptographic token lifetime calculations must be handled with deliberate diligence. Vercel does not mint an entirely new token upon every single function invocation, but instead caches and reuses an existing token for up to 90 minutes, with the underlying function token having a time-to-live (TTL) of 2 hours. If a serverless function receives a token that was minted 80 minutes ago, its remaining validity window is merely 40 minutes. Any long-running batch workload that runs longer than that remaining duration must be architected by decomposing it into discrete execution stages under the baseline expectation that the token will expire mid-flight.
Going deeper
Short-lived SSH Certificates without SSH Private Key Distribution and Session Auditing
If you are still receiving the ~/.ssh/id_ed25519.pub public key from each developer and manually pasting it into the ~/.ssh/authorized_keys file on every server when connecting to internal Linux servers or GPU clusters, two major loopholes arise. First, when an employee resigns or loses a laptop, it is difficult to go around hundreds of servers and erase that employee's public key one by one. Second, if multiple people connect with the same ubuntu or ec2-user account, it is hard to distinguish who ran which command.
Modern ZTNA environments use short-lived SSH certificates or identity-federated SSH instead of static public key files. Cloudflare Access for Infrastructure and HashiCorp Vault SSH CA issue short-lived certificates. Tailscale SSH does not issue certificates; it is an identity-federated approach that authorizes SSH connections using tailnet identity and access policies. The steps below illustrate the workflow of the short-lived certificate approach.
- No individual developer public keys are placed on the server; only the single SSH CA public key of the organization (
TrustedUserCAKeys) is registered. - When a developer attempts to connect to a server, the ZTNA client verifies SSO, MFA, and device posture, and then immediately issues a short-lived SSH certificate with a validity period of only a few hours (e.g., 4 to 8 hours).
- Once the validity period expires, the certificate automatically expires, leaving no key itself to revoke, and connection logs and command audit records accurately record not only
ubuntubut also the actual SSO email (minsu@company.com).
Balancing developer productivity and security controls: Company-wide phased ZTNA rollout strategy
No matter how excellent a ZTNA solution is, if a one-line announcement is sent to all employees one morning and full tunnel and TLS decryption are enabled all at once, all development and sales across the company will grind to a halt that day. A failure-free internal rollout and installation must follow this four-stage incremental rollout.
| Stage | Target and configuration | Key verification metrics |
|---|---|---|
| Stage 1: Inbound removal and ZTNA conversion of web resources | Place browser-based resources (internal wiki, admin) usable without endpoint agent installation behind cloudflared tunnels + SSO (Access), and close public inbound ports |
0 external port scan exposures, browser SSO login success rate |
| Stage 2: Endpoint installation for infrastructure and pilot groups (Split Tunnel) | Install agents on endpoints of 10 to 20 security team members and platform engineers. Connect only internal non-conflicting CIDRs (10.240.0.0/16) and Split-Horizon DNS using include mode (Include Split Tunnel) |
0 conflicts with home routers and printers, DERP fallback and subnet router latency |
| Stage 3: Developer CA bundle automation and posture warning mode | First deploy scripts via MDM for internal root CAs, integrated PEM bundles, and shell environment variables (NODE_EXTRA_CA_CERTS, etc.). Operate device posture in audit/warning (Audit/Log) mode instead of immediate blocking to notify non-compliant endpoints in advance |
0 certificate errors in CLI, Docker, and coding agents; posture compliance rate reaching 98% or higher |
| Stage 4: Company-wide expansion, transition to posture enforcement, and legacy VPN decommissioning | Switch posture rules to enforcement (Enforce), verify SCIM automated revocation integration, and permanently power off existing legacy VPN appliances and close inbound ports | 100% blocking of unauthenticated/non-compliant device connections, completion of legacy VPN appliance removal |
At work
Center Robotics: Redesigning Split Tunnel and DNS to resolve home network paralysis and internal domain exposure during remote work
Center Robotics, which developed logistics robot control AI, introduced a mesh VPN and installed it on the MacBooks of 80 developers to enhance the security of internal GPU servers and development databases. However, on the afternoon of the deployment day, complaints poured in from half of the developers currently working from home, saying, "Whenever I turn on the VPN, my home Wi-Fi router settings page, wireless printer, and local robot simulator (192.168.0.x) all become completely unresponsive." At the same time, the security team received a report from an external bug bounty researcher stating, "When querying public DNS, internal server names like gpu-h100-01.gaon.io and hr-db.gaon.io and their private IP lists are completely visible from the outside."
When the infrastructure team investigated, there were two design mistakes. First, the subnet router was configured to route the entire 192.168.0.0/16 range through the VPN simply because the past on-premises server room range was 192.168.0.0/24, so developers' home router ranges (192.168.0.0/24) conflicted head-on. Second, A records for internal-only servers had been written directly in the external public DNS zone for convenience.
Over the weekend, the team rectified the network and DNS as follows:
- Transition to non-conflicting ranges and precision Include Split Tunnel: The team organized the cloud VPC range to
10.220.0.0/16, changed devices in the old server room to be accessed only via the VPN's unique CGNAT addresses (100.64.x.x) and dedicated non-conflicting subnet routing, and completely removed the192.168.0.0/16route advertisement. Split tunneling was fixed to include mode, routing only10.220.0.0/16and100.64.0.0/10through the tunnel. - Split-Horizon DNS configuration: The team completely deleted all 40 or so internal-only
Arecords from external public DNS. Instead, they registered*.corp.gaon.ioonly in the private DNS inside the corporate VPC, and configured the VPN client's Split DNS feature to forward onlycorp.gaon.iodomain queries to the in-tunnel DNS resolver. - Least privilege ACL enforcement: The team deleted the default allow rule that let every developer access every port on every server, and separated role-based ACLs so that the robot firmware team could access only the simulation servers, and the AI model team could access only the GPU cluster (
tag:gpu-cluster).
On Monday morning, the local devices and printers of developers working from home operated flawlessly even with the VPN turned on, and querying internal server names from the external internet exposed no information.
World Cloud: Coding agent SSL errors erupting during ZTNA rollout and revoking sessions of departing employees
World Cloud, which built enterprise AI solutions, adopted Cloudflare Zero Trust (Tunnel + Access + Gateway TLS inspection) to meet ISMS-P and client security audit criteria. The team moved internal admin web pages to cloudflared outbound tunnels, successfully closing all inbound ports in AWS security groups.
However, as soon as the ZTNA client was enabled on developers' laptops and TLS inspection was activated, the entire development team came to a standstill. Although every site opened properly in the Chrome browser, Node.js servers running in the terminal, Python pip/poetry, and the AI coding agent CLIs developers used daily failed whenever calling external LLM APIs, outputting Error: unable to get local issuer certificate. When some pressed developers began adding export NODE_TLS_REJECT_UNAUTHORIZED=0 to .zshrc, the security team sounded the alarm.
The security engineers and platform team immediately created a standard endpoint configuration package and deployed it via MDM.
| Problem area | Workaround (prohibited) | World Cloud's standard solution |
|---|---|---|
| Node.js and coding agent CLIs | NODE_TLS_REJECT_UNAUTHORIZED=0 (disabling TLS verification) |
Configured export NODE_EXTRA_CA_CERTS="/Library/Application Support/NuriZTNA/nuri-root-ca.pem" in the standard shell profile to point to the internal root CA path deployed via MDM |
| Python, curl, and Git tools | pip --trusted-host, git http.sslVerify=false |
Automatically generated nuri-combined-ca-bundle.pem, which combined the system default CA bundle with the internal root CA, and assigned it to SSL_CERT_FILE, REQUESTS_CA_BUNDLE, and git http.sslCAInfo |
| Certificate pinning apps | Shutting down the ZTNA agent itself | Formally registered strict certificate pinning domains, such as Apple OS updates and select Docker registries, in the Do Not Inspect (decryption exclusion) list in the ZTNA console |
| Revoking permissions upon contractor contract termination | Manually cleaning up accounts a week after departure | Integrated the internal IdP (Okta) and ZTNA via SCIM so that as soon as a departure was processed in the HR system, ongoing tunnel sessions and Access tokens were automatically revoked within 1 minute |
With this measure, developers were able to use coding agents and package managers as usual without using a single line of security bypass options, and passed the security audit's endpoint control and immediate revocation for departing employees items with a perfect score.
Common mistakes
- "Because the IP address of a user who connects to the internal corporate VPN falls within the internal corporate network range (
10.x.x.x), it is completely safe to leave all internal corporate server firewalls wide open to that entire range." This represents precisely the single greatest vulnerability of traditional perimeter-based VPN architectures: the danger of implicit trust and lateral movement (Lateral Movement). Because the compromise of even a single endpoint device allows the entire internal network to be breached, organizations must verify both identity and device posture in strict accordance with Zero Trust principles, opening access exclusively to the specific resources and ports that are strictly necessary under the principle of least privilege (ACL). - "In order to allow users to connect to an internal corporate web server from the outside, inbound port 443 must unconditionally be opened on the router or within security groups, even when using Cloudflare Tunnel." This is completely incorrect. Because
cloudflaredinitiates and establishes an outbound connection from within the internal corporate server out toward the external Cloudflare edge first, and subsequently receives incoming requests through that established tunnel, there is absolutely no need to open even a single inbound port on the internal corporate firewall. - "Using
192.168.0.0/16or192.168.1.0/24as the internal corporate VPC range is convenient and easy to manage because it is familiar." Because the vast majority of consumer home Wi-Fi routers and cafe Wi-Fi networks utilize192.168.0.0/24or192.168.1.0/24, the very moment a telecommuting employee activates their VPN, an IP address space collision occurs between their local network and the internal corporate range, causing connectivity to internal corporate servers or local peripheral devices to stop working entirely. - "As long as an internal-only server domain points to a private IP address (
10.x.x.x), external users cannot connect to it, so there is no problem whatsoever with registering it in a public DNS." Even though external users cannot establish direct connections to private IP addresses, exposing internal corporate hostnames along with the structural layout of internal IP ranges in a public DNS effectively hands external attackers an internal asset inventory and a comprehensive corporate network map for free. These domains must without exception be hidden using Split-Horizon DNS (private DNS combined with conditional forwarding). - "If an SSL certificate error occurs in Node.js or Python following the introduction of corporate ZTNA, it should be resolved by turning on
NODE_TLS_REJECT_UNAUTHORIZED=0orverify=False." This constitutes a fatal security violation that completely shuts off certificate verification itself, leaving network traffic utterly defenseless against man-in-the-middle attacks. Administrators and developers must unconditionally register the internal root CA certificate inNODE_EXTRA_CA_CERTSor within consolidated bundles (SSL_CERT_FILE,REQUESTS_CA_BUNDLE) so that traffic can pass regular validation successfully. - "Simply deleting the corporate email account of a departing employee will automatically and immediately disconnect any VPN tunnel that is already connected to their laptop." VPNs that employ long-term digital certificates or separate local user accounts may allow an existing tunnel or certificate to remain fully operational until its designated expiration date, even after the associated corporate email account has been deleted. Organizations must federate their identity provider (IdP) with ZTNA via SSO and SCIM, configuring short session lifetimes and ensuring that immediate session revocation (Revoke) functions properly.
Summary at a glance
| Core topic | Key sentences to remember for exams and practice |
|---|---|
| Traditional VPN vs. ZTNA | Traditional perimeter-based VPNs are acutely vulnerable to lateral movement (Lateral Movement) once an entity enters the internal network. In contrast, ZTNA (NIST SP 800-207) grants least-privilege access strictly to individual resources based on verified identity and device posture rather than physical network location. |
Outbound tunnel (cloudflared) |
Connects internal corporate services with zero open inbound ports by establishing an outbound connection from within the enterprise out to the edge first. Production environments must establish high availability (HA) using two or more connector replicas. |
| Mesh VPN (WireGuard · Tailscale) | Decouples the control plane from the data plane (point-to-point P2P, with encrypted relay via DERP if direct paths are blocked), connects agentless resources (such as AWS RDS) through subnet routers, and restricts accessible ports using tag-based access policies (the recommended approach is grants, whereas acls is considered legacy). |
| Split tunneling and RFC 1918 collisions | Utilize an internal enterprise CIDR block (such as 10.240.0.0/16) that does not overlap with typical consumer home Wi-Fi router network ranges (192.168.0.0/24, 192.168.1.0/24), and route only the strictly required enterprise ranges using Include mode. |
| Split-Horizon DNS | Register internal-only domains (*.internal) exclusively within private DNS zones, querying them solely through conditional forwarders configured in the ZTNA client to prevent any information leakage to external entities. |
| IdP, SCIM, and device posture | Verify identity using single sign-on (SSO) combined with phishing-resistant MFA, strictly enforce operating system patch levels, whole-disk encryption, and MDM/EDR posture criteria, and automatically revoke both corporate accounts and active sessions immediately via SCIM upon employee resignation or termination. |
| Endpoint CA certificates and CLI tools | Disabling verification via configuration parameters such as NODE_TLS_REJECT_UNAUTHORIZED=0 is strictly and categorically prohibited. Distribute NODE_EXTRA_CA_CERTS (add) along with SSL_CERT_FILE and REQUESTS_CA_BUNDLE pointing to a unified PEM bundle. |
Check the official docs
- NIST — SP 800-207 Zero Trust Architecture: Seven tenets of Zero Trust and logical architecture standards for the Policy Engine (PE), Policy Administrator (PA), and Policy Enforcement Point (PEP).
- Cloudflare Zero Trust — Cloudflare Tunnel (
cloudflared): Operating principles of outbound-only tunnels and high-availability replica configuration. - Cloudflare One — Split Tunnels: Include/Exclude split tunneling configuration for Cloudflare One Client (formerly WARP).
- Cloudflare One — User-side certificates: Manual deployment: Official procedure for registering the internal root CA certificate in Node.js, Python, Git and other developer tools.
- Tailscale Docs — How Tailscale Works, Subnet Routers & ACLs: WireGuard mesh data plane, DERP relays, subnet routers, and ACL design.
- Tailscale — Grants vs. ACLs: Recommended policy regarding grants and the rules for coexisting with legacy ACLs within a single policy file.
- llama.cpp — Security Advisory GHSA-j8rj-fmpv-wcxw: Affected versions and patch status for the RPC backend remote code execution vulnerability (CVE-2026-34159).
- Model Context Protocol — Authorization: Credential handling methods for STDIO servers and the prohibition clause regarding token pass-through.
- Vercel — OIDC Federation: Scope of availability across subscription plans, issuer modes (Team · Global), and reuse duration and TTL for function tokens.
Self-check
4-1. Compare how a traditional perimeter-based VPN and NIST SP 800-207-based Zero Trust Network Access (ZTNA) differ in terms of the "scope of access granted after passing authentication," and write down the representative lateral propagation risk that arises within a traditional VPN when a single endpoint device is compromised.
4-2. When an organization seeks to expose an administrative web server located in an internal private subnet exclusively to authorized employees connecting from the outside, explain in terms of the direction of connection establishment why using cloudflared (Cloudflare Tunnel) allows external access without opening even a single inbound port on the internal firewall (or security group).
4-3. An enterprise configured its cloud VPC network range as 192.168.1.0/24 and deployed a VPN to all employee laptops, after which employees working from home either could not connect to internal enterprise servers or experienced disconnections from their home wireless printers. Explain the root cause of this phenomenon and describe the fundamental network range design solution.
4-4. Explain the security problems that occur when an internal-only development database domain (db.dev.internal.corp) is registered in an external public DNS with a private IP address, and explain in exactly two sentences the Split-Horizon DNS configuration that resolves this vulnerability.
4-5. When TLS inspection (TLS Inspection) in an internal ZTNA is turned on, after which, developers' laptops experience failures in Node.js-based AI coding agents and Python requests due to certificate errors, explain why NODE_TLS_REJECT_UNAUTHORIZED=0 must not be used, and state the correct environment variable names and file structure differences that must be configured for Node.js and Python, respectively.
4-6. Design task: An organization intends to grant access permissions only for an internal staging PostgreSQL database (AWS RDS on port 5432, on which agents cannot be directly installed) to 15 contract developer personnel, while preventing them from accessing other internal servers (such as SSH on port 22), and immediately severing their connection upon contract termination. Describe what should be designed for each of the following in a mesh VPN or ZTNA architecture: (1) the RDS connection component, (2) the means for restricting ports and destinations, and (3) the automated revocation protocol upon departure.
Hands-on tasks
Exercise
Designing an Internal ZTNA and Mesh VPN Migration Architecture Diagram and Writing Least-Privilege ACLs (50 minutes)
- Assume that the following three internal assets currently exist within the enterprise:
- Internal operations admin web (
http://10.240.10.20:3000, accessed via browser only) - Staging RDS PostgreSQL (
10.240.20.50:5432, unable to install an agent directly) - AI inference GPU server (
10.240.30.10, SSH port 22 and API port 8000)
- Internal operations admin web (
- Design in a table format how to place
cloudflaredtunnels versus mesh VPN subnet routers (including high-availability replicas) to connect each asset without opening any public inbound ports. - Write access rules that allow only least privilege to the three groups—
group:ops(operations admin),group:backend(RDS 5432 + inference API 8000), andgroup:ml-infra(GPU server SSH 22 + API 8000)—using grants, which is the Tailscale-recommended approach (the policy file must be authored in HuJSON format).
Done when: All three assets have 0 public inbound ports open, the RDS is connected via a subnet router (or private tunnel), and within the grants policy, group:backend is strictly separated so that it cannot access port 22 (SSH) on the GPU server.
Exercise
Creating an Enterprise-Wide Device ZTNA Rollout Checklist and Developer CA Environment Script (40 minutes)
- Define the list of CIDR blocks to be placed into split tunneling (Include mode) and the forwarding rules for the Split-Horizon DNS domain (
*.internal.company.io) so that they do not conflict with the home networks of telecommuting employees (192.168.0.0/16). - List four mandatory Device Posture inspection items to be evaluated before permitting access, alongside identity provider (IdP) integration requirements (SSO, MFA, and SCIM).
- Combine the internal root CA certificate (
company-root-ca.pem) with the system default bundle (/etc/ssl/cert.pem) to generatecombined-ca-bundle.pem, and write a macOS/Linux shell script (setup-dev-ca.sh) that configures Node.js, Python, curl, and Git to trust this certificate without disabling TLS verification.
Done when: The script contains absolutely no security-circumvention code such as NODE_TLS_REJECT_UNAUTHORIZED=0 or -k, and precisely distinguishes between NODE_EXTRA_CA_CERTS and the unified bundle-based SSL_CERT_FILE/REQUESTS_CA_BUNDLE/http.sslCAInfo.