Ask a network team about their firewall and they will describe what it blocks coming in. Ask what it allows going out, and the answer is usually 'almost everything'. That asymmetry is the attacker's favorite feature of the modern enterprise. Every stage of a breach after initial access is outbound traffic: calling home to a command-and-control server, pulling down tooling, exfiltrating the data. Egress control is the neglected half of the firewall, and it is the half that can catch the theft.

The historical logic made sense: the threat was outside, the assets inside, so you built a wall facing out. But once an attacker is inside, and modern defense assumes some will get in, the wall is behind them. Their malware needs to reach the internet to receive commands and to ship out what it steals. If outbound is unrestricted, it does both trivially, over ports that look ordinary. Controlling egress reintroduces friction at exactly the stage where the attacker has the most to lose.

Egress Control: Why Outbound Traffic Is the Blind SpotDiagram with these labels, in reading order: INSIDE; EGRESS CONTROL; INTERNET; outbound; allowlist; denied; no egress control → free; Compromised host; Egress policy; Egress proxy; / filter; Allowed; destinations; Attacker C2; + exfil target; No egress control →; C2 and exfil leave; freely.INSIDEEGRESS CONTROLINTERNEToutboundallowlistdeniedno egress control → freeCompromised hostEgress policyEgress proxy/ filterAlloweddestinationsAttacker C2+ exfil targetNo egress control →C2 and exfil leavefreely
Where egress control interrupts the second half of an intrusion.

What 'controlling egress' means

Controlling egress does not mean blocking the internet. It means outbound traffic passes through a policy instead of a gap. Servers, in particular, should reach a short, known list of destinations (the package repositories, APIs and update endpoints they need) and nothing else. A database server has no legitimate reason to open a connection to an arbitrary host in another country. When it tries to, that attempt is the signal, and an egress policy is what turns the attempt into an alert instead of a silent success. This works as detection because a compromised workload's first outbound call to attacker infrastructure usually goes to a destination it has never legitimately needed.

Why it matters: Data exfiltration and command-and-control are both outbound. A network that inspects ingress closely and lets any host talk to any destination has instrumented the wrong direction for the attacks that cause loss.
  • Default-deny egress for servers. Workloads should reach an allowlist of destinations through a proxy or filtering gateway. This is far more tractable for servers than for user laptops, so start there.
  • Force outbound through a chokepoint you can see. Traffic that bypasses the proxy is traffic you cannot inspect; ensure there is no direct route to the internet that skips the control.
  • Watch DNS as an egress channel. Even hosts with blocked egress can send data out through DNS queries; monitor for the high-volume, high-entropy lookups that signal tunneling.
  • Alert on new and rare destinations. A workload that suddenly contacts a domain it has never used, registered last week or hosted in an unusual location, shows a classic sign of C2.
  • Do not trust the port. Attackers hide C2 in traffic that looks like ordinary web traffic, so inspect where you can instead of assuming a common port is benign.

Cloud defaults make this harder, and cloud tooling makes it easier

In cloud environments, egress is often wide open by default: a workload can reach the entire internet unless you deliberately constrain it with egress security groups, NAT policies or a firewall service. That default has contributed to cryptomining and data-theft incidents that an outbound allowlist would have limited. The upside is that cloud gives you the primitives to define egress declaratively, per workload, as code, so the allowlist becomes a reviewable artifact rather than a pile of hand-edited rules. The tools exist, but the default works against you.

You can only allowlist egress once you know what each workload legitimately talks to, which means inventorying your systems and their real dependencies first. The blind spot is outbound, and you cannot control traffic you have not discovered.

Back to the knowledge baseRequest an assessment