Egress control and least access: the direction almost nobody filters
The outbound direction is rarely filtered, and that is where a compromised host escapes.

Networks are built to filter what comes in. What goes out is usually permitted without a second question: outbound rules are written for convenience, or left unwritten, and the default becomes allow. Egress filtering — the filtering of outgoing traffic — decides whether a compromised host reaches its controller, and whether data leaves. Least access (RFC 4949’s least privilege) writes those rules: an architecture “should be designed so that each system entity is granted the minimum system resources and authorizations that the entity needs to do its work” (rfc4949.txt lines 10129–10131). Ingress filtering has been recommended practice for more than twenty-five years; that discipline turned the other way is still the exception.
Two definitions, one default, one gap
A glossary defines the pair evenly — ingress filtering is “Filtering of incoming network traffic”, egress filtering “Filtering of outgoing network traffic” (nist-sp800-41r1.txt lines 1930 and 1922). One guideline holds both inside a single default — deny by default, “To block all inbound and outbound traffic that has not been expressly permitted by firewall policy” (lines 1919–1920) — then records what is deployed: “Less stringent policies are generally used for outgoing TCP and UDP traffic because most organizations permit their users to access a wide range of external applications located on millions of external hosts” (lines 1300–1302).
inbound outbound
| |
v v
ingress filtering egress filtering
"who may enter?" "who may leave,
and reach what?"
| |
denied by default permitted by default
(recommended practice) (the usual deployment)
| |
the source is stopped at the compromised host is handed
the boundary its route by the network
One default, written down for both directions; a practice that applies it to one.
What an unfiltered exit is worth
An outbound path that permits everything is a control the attacker never has to defeat: the compromised host reaches out and the network consents, because the rule that would have stopped it was never written. NIST describes the same mechanism from the other side: outbound proxies are “useful for detecting systems that are making inappropriate or dangerous connections from inside the protected network” (lines 1403–1404). First, the source rule: “Organizations should only permit outbound traffic that uses the source IP addresses in use by the organization–a process that helps block traffic with spoofed addresses from leaking onto other networks” (lines 447–449).
Writing the outbound ruleset
Filtering outbound answers two questions; a ruleset that answers only one is half a control.
Which sources may leave: only the addresses the organisation actually uses.
Which destinations and services may be reached, from which source: these follow the service and the class of destination, not the host — one written per service survives re-addressing, one built from addresses does not. NIST calls address-based policy “one of the most error-prone, because the IP address associated with an undesired entity often changes over time” (lines 1227–1228).
Named exceptions are part of the design, not a failure of it: a firewall denies all ICMP “except for those types and codes specifically permitted by the organization” (line 1319).
The controlled exit
An explicit proxy collapses the outbound decision into one place that also logs. “Most proxy servers now in use are outbound proxy servers” (line 668), and an outbound HTTP proxy lets an organisation “filter dangerous content before it reaches the requesting PC” (lines 1405–1406). NIST’s current guidance asks a platform instead to “deliver a common ingress and egress security policy for application environments (e.g., VPCs, VNETs, VCNs) across clouds” (nist-sp800-215.txt lines 1437–1438).
Roll it out one segment at a time, starting where the least should be leaving: user and server segments. Expect the failure that always comes — a legitimate service nobody remembered — and answer it with a named exception rather than a widened permit; approving and expiring it is a governance subject for another area.
Limits, and the ingress analogy
Filtering stops the destination it knows, not the one it does not: an allowed port carrying encrypted traffic, or a tunnel the device cannot parse, is invisible — “if the firewall does not understand the particular tunneling mechanism used, the traffic cannot be interpreted” (lines 901–902).
The analogy transfers, limit included. Ingress filtering is recommended at every level, not only the last mile: “It’s perfectly fine, and recommended, to also perform ingress filtering at the edges of ISPs where appropriate, at the routers connecting LANs to an enterprise network, etc.” (rfc3704.txt lines 408–410), because “The closer to the actual source ingress filtering is performed, the more effective it is” (lines 629–630). Outbound, that source is your own host. The limit transfers too: filtering “does not preclude an attacker using a forged source address of another host within the permitted prefix filter range” (rfc2827.txt lines 358–360).
Where IPv6 removes the argument
With IPv4 there is usually an argument: translation at the boundary hides internal hosts, so the outbound direction does not matter. The NAT and PAT sibling covers why that claim is weak. With IPv6 there is no translation to hide behind and every internal address is routable: the egress ruleset is the whole control, not half of one.
Level and prerequisites
L4 — advanced. The reader should already be able to read a firewall policy and an access list, and should know what translation does and does not buy. The mechanics of one list — order, match, action and the implicit deny — belong to acl-order-match-action-and-default-deny; the policy and its management belong to firewall-policy-versus-acls; translation and its limits belong to nat-pat-and-its-limits-as-a-security-control. This sheet owns only the direction none of them owns.
Where to go next
References
- RFC 2827 — P. Ferguson, D. Senie, Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing, BCP 38, Best Current Practice, May 2000. Obsoletes RFC 2267. https://www.rfc-editor.org/rfc/rfc2827.txt (local copy
rfc2827.txt). - RFC 3704 — F. Baker, P. Savola, Ingress Filtering for Multihomed Networks, BCP 84, Best Current Practice, March 2004. Updates RFC 2827. https://www.rfc-editor.org/rfc/rfc3704.txt (local copy
rfc3704.txt). - RFC 4949 — R. Shirey, Internet Security Glossary, Version 2, FYI 36, Informational, August 2007. Obsoletes RFC 2828. Cited here only for the definition of least privilege. https://www.rfc-editor.org/rfc/rfc4949.txt (local copy
rfc4949.txt). - NIST SP 800-41 Revision 1 — K. Scarfone, P. Hoffman, Guidelines on Firewalls and Firewall Policy, September 2009. NIST Special Publication. https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-41r1.pdf (local copy
nist-sp800-41r1.txt). - NIST SP 800-215 — R. Chandramouli, Guide to a Secure Enterprise Network Landscape, November 2022. NIST Special Publication. https://doi.org/10.6028/NIST.SP.800-215 (local copy
nist-sp800-215.txt).