Skip to content
Tech Interview Prep
Technical interview guide

Network Security Basics

Firewalls, VPNs, and network segmentation: the perimeter and internal controls that limit blast radius.

Read
27 min
Practice MCQs
25
Interview Q&A
25
Edition
v3
Editorial status
Reviewed

Scope: NIST SP 800-41 Rev. 1, SP 800-77 Rev. 1, SP 800-207/207A, CISA ZTMM 2.0, and RFC 8446 guidance accessed 2026-08-31..

Curated: · Written: · Reviewed:

25 questions

MCQ-1What is a firewall's primary security function?
MCQ-17A stateless packet filter evaluates its rules top-down and stops at the first match. Its rules, in order, are: 1. allow tcp 10.0.4.0/24 -> 10.0.9.0/24 any 2. allow tcp any -> 10.0.9.5 443 3. deny tcp 10.0.4.7 -> 10.0.9.5 8443 4. allow ip any any A flow from 10.0.4.7:51000 to 10.0.9.5:8443 is being permitted, even though rule 3 was added to block exactly that flow. What explains the permit?
MCQ-4A payments service runs three tiers in one VPC: web 10.0.1.0/24, app 10.0.2.0/24, db 10.0.3.0/24. The only security group rules are web→app on 8443 and app→db on 5432; all other traffic is denied. An attacker gets a shell on a web host. Which connections can the attacker complete?
MCQ-25A deny rule on the perimeter firewall blocks TCP 5432 from 10.20.1.0/24 to 10.30.7.0/24. The requirement is that no app host can open TCP 5432 to the payments DB. From app-01 (10.20.1.11), a connection to the DB at 10.30.7.20:5432 times out after 30 s, and the firewall log shows a deny for that flow. The same DB host also answers on 10.30.8.20:5432, where the handshake completes in 12 ms and a query returns. The DB host has interfaces in both 10.30.7.0/24 and 10.30.8.0/24, and both addresses reach the same listener. What does this evidence show about the rule's coverage?
MCQ-18A database host is dual-stack: 10.20.0.11 and 2001:db8:20::11. The perimeter firewall holds one inbound rule for TCP/5432: permit from 10.20.9.0/24 (the bastion), deny from 0.0.0.0/0, and no IPv6 rules. A scan from an external host at 2001:db8:99::5 reports 10.20.0.11:5432 filtered and 2001:db8:20::11:5432 open, and a manual connection from that host completes the PostgreSQL startup handshake. Which conclusion is correct?
MCQ-22A team runs a passive IDS sensor on a switch SPAN port and an inline IPS on the edge proxy in front of a public API. The IPS is configured fail-open. During a 10-minute window the IPS process crashes and restarts; 1,200 requests arrive, 40 of them matching the exploit signature. What do the two controls do during the outage?
MCQ-2A stateful firewall between an application tier and its database has a connection table of 131,072 entries. Established TCP flows time out after 7,200 s; half-open flows time out after 45 s. The application tier holds 120,000 long-lived TCP connections to the database, each idle for up to 15 minutes between queries. At 03:00 a batch job opens 15,000 new TCP connections. The firewall refuses some and logs 'connection table full'. Firewall CPU is 17% and the link is at 5% utilization. Which counter increments, and by how much?
MCQ-3An egress firewall is migrated from default-allow to default-deny. The firewall is stateful. The only rule added is: permit tcp 10.0.2.0/24 -> 203.0.113.20:443. A service on 10.0.2.55 that calls https://api.example.com (which resolves to 203.0.113.20) now fails with 'could not resolve host: api.example.com'. A direct connection to 203.0.113.20:443 by IP succeeds. The service also syncs time with 10.0.6.6:123/UDP. Which flow is the default deny dropping that explains the 'could not resolve host' failure?
MCQ-5A payments service runs in a subnet whose only egress rule is enforced by a stateful firewall: permit TCP 443 to the addresses api.psp.example resolves to, re-resolved on every new connection, and drop everything else. DNS is permitted only to the internal resolver at 10.0.0.2. An attacker has code execution on one host and wants to move card data off it. Which outbound flow still carries the data out?
MCQ-23A flood of roughly 300,000 new connections per second arrives from tens of thousands of source addresses. The origins stay at 15% CPU, the transit link under 40% utilization, and the firewall and load balancer well below their CPU limits, yet both stop accepting new connections within a second. Which change addresses the bottleneck this incident exposed?
MCQ-15An internal resolver at 10.0.0.53 carries an RPZ rule that returns NXDOMAIN for c2.example. Over 24 hours it logs zero queries for that name, yet the IDS records 1,800 outbound TLS sessions to c2.example's addresses from the 500 managed endpoints, and the C2's A record rotates every 6 hours. The egress firewall logs sustained TLS traffic from those endpoints to 1.1.1.1:443 across the same window. Which explanation accounts for the empty resolver log and the successful sessions?
MCQ-6A company runs a site-to-site IPsec VPN between two offices, 10.1.0.0/24 and 10.2.0.0/24, over the public internet. The gateways negotiate ESP in tunnel mode. A security auditor captures packets on the WAN link between the gateways and asks whether the internal host addresses are exposed. What should the network engineer answer?
MCQ-16An enterprise's egress proxy re-signs every outbound TLS connection with an internal inspection CA whose private key is trusted by all 12,000 managed laptops. An attacker exfiltrates that CA private key but no session keys. Which capability does the attacker gain?
MCQ-7Northwind's VPN concentrator hands every authenticated user an address in 10.20.0.0/16 and, until last month, pushed a route for 10.0.0.0/8, so any laptop could open a TCP connection to any internal host. An attacker with one valid session reached 212 hosts in 11 minutes. The team now replaces the pushed 10.0.0.0/8 route with a route for 10.30.0.0/16 and these concentrator ACLs, evaluated top to bottom, first match wins: permit 10.20.0.0/16 -> 10.30.1.10 tcp 443 permit 10.20.0.0/16 -> 10.30.9.5 tcp 445 permit 10.20.0.0/16 -> 10.30.7.20 tcp 443 deny ip any any Internal services: finance app 10.30.1.10:443; finance admin 10.30.1.10:8443; HR app 10.30.1.11:443; backup server 10.30.9.5:445 (SMB); hypervisor management 10.30.7.20:443. A second attacker with a valid VPN session probes all five. Which services does the concentrator allow?
MCQ-8A 6,000-laptop fleet full-tunnels all traffic to a VPN concentrator that peaks at 8.5 Gbps of its 10 Gbps capacity. The team enables split tunneling, pushing routes for 10.0.0.0/8 and 172.16.0.0/12 only; concentrator peak falls to 2.1 Gbps. Two weeks later the SOC reports that uploads of internal documents to personal cloud storage, which the inline gateway DLP used to flag several times a day, are no longer flagged at all. The endpoint DLP agent still reports healthy and its file-scan events are unchanged. What explains the loss of detections?
MCQ-9A gateway rule grants the internal admin API to any request that appears to come from a managed corporate machine. A contractor's compromised laptop on the corporate VPN reaches the API this way. Which piece of evidence is the rule wrongly treating as sufficient on its own?
MCQ-11An internal admin API sits behind a zero-trust gateway. The gateway's policy for admin API access requires a verified identity assertion, a device certificate, and a device posture check no older than 15 minutes. A request arrives with a valid WebAuthn assertion for user ana, a device certificate from a managed laptop whose last successful posture check was 6 hours ago, a source address inside the corporate VPN range, and a risk-engine score of 0.2 against a 0.5 deny threshold. What should the policy engine return for this request?
MCQ-12A zero trust policy engine issues a session token at 09:00 after MFA from a managed laptop on the corporate network; the token lives 12 hours. The engine's policy is: device posture unknown → step-up authentication; impossible travel → terminate the session. At 10:40 the device agent stops reporting disk-encryption status, and at 10:42 the same token is presented from an ASN in another country. What does continuous evaluation require the engine to do at 10:42?
MCQ-10A retailer replaces its VPN with a ZTNA service that authenticates users with SSO+MFA and grants per-application access. All 52 internal services sit behind the ZTNA service, but the internal network is a flat /16 with no host firewalls, so the services are also reachable directly by IP. A penetration test finds that a contractor laptop holding a valid ZTNA session, authorized for 3 of the 52 services, can open TCP connections to 38 of them by IP address, including Jenkins on 8080. The ZTNA logs show no access to those 38 services. Which change most directly closes the path the tester used?
MCQ-13A platform team runs microsegmentation with mutual TLS: every workload gets a short-lived certificate from a central control plane, and sidecars enforce default-deny authorization using those identities. During a scheduled 6-minute control-plane upgrade, running pods keep serving normally. A new payments pod starts at minute 2 of the window. What happens to that pod?
MCQ-24A payments API gateway verifies the caller's JWT signature and expiry locally, then calls a central policy service for a per-route authorization decision. `POST /v1/payments` needs that decision; `GET /v1/accounts/{id}/balance` returns the caller's own account data and is authorized by the token's `sub` claim alone. The policy service's p99 is 18 ms and the gateway's authz timeout is 100 ms. Its regional cluster goes down for 12 minutes. What should the gateway do for the duration of the outage?
MCQ-21A gateway writes one record per authorization decision, including the policy version it evaluated. Investigating a 403 on `POST /v1/refunds`, the team has: - 14:05:40. `svc-batch` removed from group `refund-operator` - 14:07:12. `{"sub":"svc-batch","act":"POST /v1/refunds","decision":"deny","policy":"refund-policy@v40","reason":"no-matching-rule"}` - 14:08:00. `refund-policy@v41` published; it drops the `refund-operator` requirement Which conclusion do these records support?
MCQ-19A retail platform's perimeter firewall has accumulated 4,200 allow rules over six years. Compliance wants each rule traceable to a business function and a date by which it is gone; the estate includes a December-only batch feed and third-party SaaS egress that never enters the service mesh. Which change closes the finding?
MCQ-20An Argo CD Application manages the `payments` namespace with `syncPolicy.automated.selfHeal: true` and the default reconciliation interval of 3 minutes. Git defines a NetworkPolicy `payments-api` that allows ingress to pods labeled `app=payments-api` on TCP 8443 only from pods labeled `app=frontend`. At 10:00:00 an on-call engineer runs `kubectl edit networkpolicy payments-api` and adds a second ingress rule allowing `0.0.0.0/0` on TCP 8443. A drift-detection CronJob compares every live NetworkPolicy in the cluster against the Git manifests and pages on any difference; it runs at 10:15:00. What does the drift job report at 10:15:00?
MCQ-14A 400-node Kubernetes cluster draws pod addresses from one /16 pool, and the CNI returns a terminated pod's address to the pool within about 90 seconds. The payments database accepts connections from any source in 10.244.7.0/24. After a rolling restart, an analytics batch job is scheduled onto an address in that range and reads the database. Which change removes this class of failure?