Security

Deny-by-Default Outbound Traffic for AI Agents and Automation

Published November 20, 2026

An AI agent that can run code, call APIs or browse the web can send data to any destination it is able to reach. Outbound control is the layer that decides what leaves the network. Blocking outbound traffic by default is the most effective single step for limiting that risk, and it is a control your team can build with existing tools.

This guide is for defensive configuration of agents you operate. It covers only how to restrict and monitor outbound traffic.

Why an outbound allow-list is needed

Agents often need outside access for a few specific reasons: a model API, a package repository, a vendor update server. Everything else is a risk, including a web page that an agent fetched and that contained instructions to send data elsewhere. Writing the list forces the team to name each dependency.

Step 1: Route agent traffic through one proxy

Configure the agent host so that web requests go through a single proxy. Agents that ignore the system proxy must be stopped from making direct connections. Block direct outbound connections from the agent segment at the firewall, and allow only the proxy address. Without this step, an agent can skip the proxy by opening a socket itself.

Step 2: Write the destination list

Create the list in the proxy, one line per destination, with an owner and a reason. Keep the list short. A typical starting point is the model provider’s API host, the package source your team uses, and the internal services the agent calls.

Step 3: Block by default on the host

On a Windows agent host, set the outbound default to Block only after you have tested the list, because a wrong setting stops the agent entirely. Create outbound allow rules for the proxy address only:

New-NetFirewallRule -DisplayName "Agent to proxy only" -Direction Outbound -Protocol TCP -RemotePort 3128 `
  -RemoteAddress 10.20.9.5 -Action Allow -Profile Domain

Test the change on a single host first. Confirm that the agent works through the proxy and fails when it tries a direct connection to an unlisted site.

Step 4: Log every blocked and allowed destination

Log proxy requests with the agent identity, destination and time. Send the logs to your central store. A list of destinations that the agent actually contacted is the best source for tuning the allow-list, and it is the record you will need after an incident.

Step 5: Review on a schedule

Review the destination list each month. Remove entries nobody uses. Investigate any new destination before adding it. A new domain is a change, and it should go through the same approval as any firewall rule.

What this does not replace

Outbound control reduces what an agent can reach. It does not prevent misuse of destinations that are allowed. Combine it with least-privilege credentials, described in Least-privilege credentials for AI agents, and with monitoring and a stop procedure, described in Kill switch and monitoring for AI agents.

Sources