Skip to content

Egress Filtering

Egress filtering is the practice of controlling and monitoring the traffic leaving a network, blocking or logging outbound connections that break security policy. It’s the outbound half of boundary defense, and it’s where an intrusion that already got in can still be stopped from doing real damage.

Most organizations pour effort into stopping inbound attacks, yet the outbound direction is where malware phones home to command and control servers and stolen data gets shipped to an attacker. NIST SP 800-41 Revision 1, the September 2009 guide to firewalls and firewall policy, defines egress filtering simply as filtering of outgoing network traffic. It also admits that outbound TCP and UDP rules are usually looser than inbound ones, because users need to reach so many external services, and that looseness is exactly what attackers count on.

How does egress filtering work?

Done well, egress filtering forces internal hosts to reach the internet only through approved proxies, blocks connections on odd ports that legitimate applications never use, and raises a flag when a workstation suddenly pushes gigabytes to an unfamiliar destination. A typical rule set lets user workstations make web traffic only through the corporate proxy, lets only the mail relays send SMTP on port 25, lets only the internal resolvers query external DNS, and denies everything else.

There’s an anti-spoofing piece too. SP 800-41 says organizations should only permit outbound packets whose source addresses belong to the organization, which stops a compromised host from launching spoofed denial-of-service traffic at someone else. ISPs apply the same idea at their edge under BCP 38 (RFC 2827).

Modern egress control goes beyond ports. Most command and control traffic now rides over HTTPS on port 443, so an allow rule for 443 alone does little. Proxies with URL categorization, DNS filtering, TLS inspection where policy and law permit it, and destination reputation feeds give the filter something meaningful to decide on. MITRE ATT&CK lists Filter Network Traffic (M1037) as a mitigation against exfiltration techniques such as Exfiltration Over Alternative Protocol (T1048).

What is the difference between ingress and egress filtering?

Question Ingress filtering Egress filtering
Direction Traffic entering the network Traffic leaving the network
Main goal Keep attackers and malicious traffic out Stop exfiltration, C2 callbacks, and outbound attacks
Spoofing check Drop inbound packets claiming internal source addresses Drop outbound packets with source addresses that aren’t yours
Typical owner of the pain External attackers Internal users and applications that need exceptions

The two work as a pair, and egress filtering also supports Data Loss Prevention. DLP inspects content to decide whether a specific file or message may leave. Egress filtering decides whether a connection may leave at all. Blocking the channel is cruder but catches exfiltration that DLP can’t read, such as encrypted archives.

What is an example of egress filtering?

Say a finance workstation gets infected through a malicious attachment. The malware tries to beacon to a server on TCP port 8443 and later to upload files over FTP. Under a default-allow outbound policy both succeed silently. Under egress filtering both connections are denied, the firewall logs show repeated blocked attempts from one host, and the SOC has a lead before any data leaves.

The usual failure is a permissive any-to-any outbound rule left in place because nobody wanted to break an application. That single gap lets an attacker exfiltrate freely long after they slip past the perimeter, which is why outbound rules deserve the same scrutiny as inbound ones.

Why does egress filtering matter for the CISSP exam?

Egress filtering falls under Domain 4 (Communication and Network Security). Objective 4.1 lists edge networks, including ingress and egress, among secure network design principles, and objective 7.2 in Domain 7 names egress monitoring as a logging and monitoring activity. Expect it framed as the complement to ingress controls and as support for both threat detection and data loss prevention. Study Domain 4: Communication and Network Security for the boundary control concepts.

In scenario questions, the clue is usually something that already happened inside: a host beaconing out, data leaving at night, or an internal machine attacking a third party. Adding inbound rules won’t fix those. And when a business owner pushes back that strict outbound rules will break things, the answer the exam prefers is a documented exception process with an owner and a review date, not leaving the network wide open.

Related terms: Data Loss Prevention, Security Policy, Malware, Threat