A network moves small labelled boxes of bytes between machines that have no idea about each other's business. Everything else — websites, email, SaaS, your VPN — is convention layered on top of that one primitive.
Data is wrapped repeatedly on the way out and unwrapped on the way in. Posting a letter is the right mental image: your words go in a page, the page in an envelope with a street address, the envelope in a mail sack with a depot address, the sack on a lorry.
Each layer only reads its own header. A switch reads Ethernet. A router reads IP. A firewall usually reads IP + TCP. A SWG like Netskope has to break TLS to read the HTTP layer at all — which is the entire reason TLS inspection exists as a product feature.
| Layer | Unit | Examples | What sees it |
|---|---|---|---|
| 7 Application | Data | HTTP, SMTP, DNS, TLS-wrapped APIs | Proxy, SWG, CASB, email gateway |
| 6/5 Present/Session | Data | TLS, cookies, sessions | TLS inspection, session hijack detection |
| 4 Transport | Segment | TCP, UDP, QUIC (on UDP) | Firewall rules, flow logs, port scans |
| 3 Network | Packet | IP, ICMP, routing | Routers, VPC flow logs, geo-IP |
| 2 Data link | Frame | Ethernet, ARP, Wi-Fi, VLANs | Switches, NAC, ARP spoof detection |
| 1 Physical | Bits | Copper, fibre, radio | Nobody, until someone unplugs it |
In conversation, "layer 3/4" means IP-and-port decisions (fast, blunt) and "layer 7" means content-aware decisions (slow, rich). "Layer 8" is a joke about the user.
a4:83:e7:1c:9d:02. Only meaningful on the local segment; rewritten at every router hop. Modern OSes randomise it on Wi-Fi for privacy, which quietly breaks MAC-based NAC.10.4.2.17 or 2a00:1450::200e. Changes when you move networks.443. Server ports are conventional (80, 443, 25, 53, 3389); client ports are ephemeral and random.A socket is the 5-tuple that uniquely identifies one conversation: protocol + src IP + src port + dst IP + dst port. Every firewall rule, flow log and connection table is built on this tuple — memorise it.
# private ranges — never routed on the internet 10.0.0.0/8 16.7M addresses — corporate/VPC default 172.16.0.0/12 1M — Docker likes 172.17.x 192.168.0.0/16 65k — home routers 169.254.0.0/16 link-local; 169.254.169.254 = cloud metadata! 127.0.0.0/8 loopback
We now follow a single request — a laptop on the office Wi-Fi loading https://app.example.com/login — and stop at every mechanism it touches.
The laptop knows the destination IP but must address the frame to a local MAC — the default gateway's. It shouts ARP: "who has 10.4.2.1?" Any machine on the segment can answer. There is no authentication in ARP at all.
VLANs slice one physical switch into isolated broadcast domains — the classic segmentation tool (guest Wi-Fi, card-data VLAN for PCI scope reduction, OT networks). Traffic between VLANs must cross a router or firewall, which is where you get to inspect and log it.
CIDR notation splits an IP into network and host parts. The number after the slash is how many leading bits are fixed.
| CIDR | Addresses | Typical use |
|---|---|---|
| /32 | 1 | A single host — allow-list entries, route targets |
| /29 | 8 | Tiny point-to-point / appliance block |
| /24 | 256 | One office subnet or VPC subnet |
| /16 | 65,536 | A whole VPC or site |
| /0 | everything | Default route, and the scariest firewall rule you can write |
Routing is a lookup: for each packet the host or router picks the most specific matching route. A /32 beats a /24 beats 0.0.0.0/0 (the default route, usually pointing at the internet gateway). Split-tunnel VPNs work exactly by injecting more specific routes for corporate ranges while leaving the default route alone.
# quick sanity checks you should be able to do mentally 10.4.2.17/24 -> network 10.4.2.0, hosts .1-.254, broadcast .255 is 10.4.3.9 in 10.4.2.0/24 ? no (third octet differs) is 10.4.3.9 in 10.4.0.0/16 ? yes
NAT rewrites source addresses so many private hosts share one public IP, keeping a translation table keyed on ports. Your office of 400 laptops appears to every SaaS provider as a handful of public IPs.
Consequences worth knowing: inbound connections need explicit port-forwarding or a reverse tunnel (which is why ZTNA uses outbound-only connectors); and CGNAT at ISPs means consumer IPs are shared too, so geo-IP and IP reputation are weak signals on their own.
Recognising these in tooling: a burst of SYNs with no completion = port scan or SYN flood. A connection that ends in RST immediately after the handshake often means a proxy or firewall killed it — useful when debugging why an app "randomly" fails behind Netskope.
No handshake, no ordering, no state. Used by DNS, DHCP, NTP, VoIP, and QUIC. Because it is stateless it is trivially spoofable, which is why UDP services are the favourites for amplification DDoS.
Google-originated, now standard: TLS 1.3 built into a UDP transport on port 443, with connection migration and faster handshakes. Security relevance is huge — many proxies and TLS-inspection engines cannot parse QUIC, so the standard practice is to block UDP/443 at the egress firewall, forcing browsers to fall back to TCP-based HTTP/2 where your SWG can see them. If someone reports "Netskope isn't logging Chrome traffic to that site", QUIC is suspect number one.
| Type | Purpose | Security angle |
|---|---|---|
| A / AAAA | Name → IPv4 / IPv6 | Fast-flux malware rotates these constantly |
| CNAME | Alias to another name | Dangling CNAMEs → subdomain takeover |
| MX | Mail servers for a domain | Tells you who really handles a target's mail |
| TXT | Free text | Home of SPF, DKIM, DMARC — and of DNS exfil |
| NS / SOA | Delegation and zone authority | Hijacked NS = total domain control |
| PTR | IP → name (reverse) | Weak evidence; anyone can set their own |
DNS over HTTPS hides queries inside ordinary HTTPS to a resolver like 1.1.1.1 or dns.google. Great for privacy on hostile networks, awful for corporate visibility: it bypasses your DNS logging and DNS-layer blocking entirely. Standard enterprise posture is to disable browser DoH via policy and block known DoH endpoints, so that name resolution stays inspectable.
NETWORK_DNS events.The chain is: leaf certificate → intermediate CA → root CA in the OS/browser trust store. Trust is transitive and entirely dependent on that store — which is precisely the hook TLS inspection uses.
paypa1-secure.com gets a free valid certificate in 90 seconds. Roughly all modern phishing is HTTPS.SNI is why a firewall with no decryption can still see which site you visited (but not the URL path or content). Encrypted Client Hello (ECH) hides even that — another erosion of network-only visibility, and another argument for endpoint and API-based controls.
A forward proxy that inspects TLS terminates the client's session, opens its own session to the server, and re-signs certificates with a private CA that you push to every managed device. Consequences you will meet in production: certificate-pinned apps break (mobile apps, Dropbox, some updaters, many API clients), so every SWG ships a bypass list; and your proxy now holds plaintext for everything, making it a top-tier asset for both compliance scope and attacker interest.
POST /api/v2/files/upload HTTP/2 Host: app.example.com which site (also in SNI) Authorization: Bearer eyJhbGci… the token worth stealing Cookie: session=abc123 the other thing worth stealing User-Agent: Mozilla/5.0 … client claim, trivially forged Content-Type: multipart/form-data a file is being uploaded Referer: https://app.example.com/drive
Status classes: 2xx success, 3xx redirect (watch open redirects in phishing), 4xx client error (401 unauthenticated, 403 forbidden, 429 rate-limited — a burst of 401s is credential stuffing), 5xx server error.
A CASB inline policy such as "allow personal Gmail but block file uploads" is implemented exactly here: match the host, match the method and content type, inspect the body, decide. That is only possible with decryption — which ties this module back to the previous one.
| Thing | Sits | Protects | Example |
|---|---|---|---|
| Forward proxy | In front of users | The organisation, from the internet | Netskope SWG, Zscaler |
| Reverse proxy | In front of servers | The app, from the internet | Cloudflare, nginx, WAF |
| Site-to-site VPN | Between networks | Traffic across the internet | IPsec/IKEv2 tunnel to a branch |
| Remote-access VPN | Laptop → network | The whole network, badly | Legacy SSL VPN appliance |
| ZTNA | Laptop → one app | Individual applications | Netskope Private Access |
Traffic steering — how you force endpoints through a proxy — is worth knowing because Netskope offers all of it: an OS-level agent/client, a PAC file, explicit proxy settings, GRE/IPsec tunnels from a branch router, or reverse-proxy interception via the IdP for unmanaged devices.
A user complains that a specific SaaS app breaks only when they are on the corporate laptop with the SWG client enabled. Everything else works. Most likely cause?
Six commands cover most real investigations. Learn to reach for them before opening a vendor console — they tell you ground truth.
# what does this name resolve to, and who says so? dig app.example.com A +short dig example.com MX dig example.com TXT # SPF lives here dig _dmarc.example.com TXT # DMARC policy dig selector1._domainkey.example.com TXT # DKIM public key dig @8.8.8.8 example.com +trace # bypass local resolver, walk the hierarchy
curl -v https://app.example.com/login # full handshake + headers curl -I https://app.example.com # headers only curl -sS -o /dev/null -w "%{http_code} %{time_total}s\n" https://x curl --resolve app.example.com:443:203.0.113.9 https://app.example.com # test a specific backend IP
openssl s_client -connect app.example.com:443 -servername app.example.com # look for: issuer chain, SANs, notAfter, protocol/cipher chosen # if the issuer is your own proxy CA, you are being inspected — expected on-prem echo | openssl s_client -connect host:443 2>/dev/null | openssl x509 -noout -dates -subject -issuer
ss -tunap # Linux: sockets + owning process (the pivot to EDR) netstat -ano # Windows equivalent; pair with tasklist /svc lsof -i -P # macOS: who has this port open traceroute -T -p 443 app.example.com # TCP traceroute; ICMP is often blocked mtr app.example.com # continuous path + loss, best for flaky links
ss -tunap or the EDR's process tree turns "a connection to 45.x.x.x" into "Chrome's renderer" or "a scheduled task running curl from a temp folder" — a completely different verdict.Capture filters (BPF syntax) decide what gets written to disk. Display filters (Wireshark syntax) decide what you see afterwards. Different languages; using the wrong one is the classic beginner error.
# tcpdump — capture filter syntax tcpdump -i any -nn host 203.0.113.9 and port 443 -w out.pcap tcpdump -i any -nn 'tcp[tcpflags] & tcp-syn != 0 and tcp[tcpflags] & tcp-ack == 0' # bare SYNs = scanning tcpdump -i any -nn -A port 53 # watch DNS in cleartext # Wireshark — display filter syntax tls.handshake.extensions_server_name == "app.example.com" http.request.method == "POST" && http.content_type contains "multipart" dns.qry.name contains "dropbox" tcp.flags.reset == 1 # who is killing connections? frame contains "password"
Useful Wireshark moves: Statistics → Conversations to find the top talkers, Follow → TCP Stream to read a whole exchange, and the Expert Information panel for retransmissions and resets.
| Source | Gives you | Blind to |
|---|---|---|
| VPC / firewall flow logs | 5-tuple, bytes, allow/deny, duration | Hostname, URL, content, user |
| DNS logs | Queried name, type, response, client | What was actually done at that host |
| Proxy / SWG logs | User, URL, method, bytes, category, verdict | Anything bypassed or non-HTTP |
| EDR network telemetry | Process ↔ connection, on and off VPN | Unmanaged devices, network gear |
| SaaS API logs | Actions inside the app, by identity | How the session was obtained |
The senior move is knowing which one answers the question fastest. "Did data leave?" → proxy bytes-out and SaaS audit logs. "What started it?" → EDR. "Where did it go?" → DNS plus flow. Any single source will mislead you.
Classic design assumed a hard shell and a soft interior. For a FinTech running SaaS plus cloud, that model is gone: the "network" is a laptop in a bedroom talking to APIs. Three things replace it.
Egress filtering is still underrated. Servers should not be able to reach arbitrary internet addresses; allow-listing outbound destinations breaks most commodity C2 and exfiltration at a stroke, and produces excellent alerts when something tries. In AWS this means egress via NAT gateway plus a network firewall or proxy, with default-deny.
Restricting east-west traffic between workloads (security groups per service, not per VPC; Kubernetes NetworkPolicy). The test of a good design: compromise of one service should not grant network reachability to the database of another.
Any inline control needs traffic to physically pass through it. Options, with trade-offs:
| Method | Covers | Weakness |
|---|---|---|
| Endpoint client/agent | Anywhere the laptop goes | Managed devices only; users may tamper |
| PAC file | Browser traffic | Browser-only, ignored by many apps |
| Explicit proxy setting | Apps honouring system proxy | Easily bypassed, no thick clients |
| IPsec/GRE tunnel from router | Whole site, all devices | Only when on that site |
| Reverse proxy via IdP | Unmanaged/BYOD to sanctioned SaaS | Only sanctioned apps behind SSO |
| API (out-of-band) | Data already in SaaS tenants | Not real-time; post-hoc |
Mature deployments layer several: agent for managed laptops, tunnel for offices, reverse proxy for contractors, API for data at rest. Netskope's page walks through each of these concretely.
Modern C2 rarely uses a weird port. It uses HTTPS/443 to somewhere plausible, or DNS, because those are always permitted.
Writing this list down, with a compensating control per line, is exactly the artefact that turns a network conversation with a regulator or a client's TPRM team from defensive to credible.
Your DNS logs show 4,000 queries in an hour to unique subdomains of cdn-metrics.io, each 45–60 characters long, from one laptop. The parent domain has a clean reputation. Best first read?