---
title: "AI Agents Behind Partner Firewalls: Fixed Tool IPs"
description: "AI agent tool calls leave from rotating sandbox and serverless IPs. Send only those calls through a fixed IP that a bank, CRM, or partner firewall allowlists."
canonical: https://fixedmark.com/blog/ai-agents-behind-partner-firewalls
updated: 2026-11-10
source: Fixedmark (https://fixedmark.com), BitMask LLP
---

AI and automation · 10 min read

# AI Agents Behind Partner Firewalls: Fixed Tool IPs

An agent's tool call leaves from whatever machine runs the tool. That is your backend, a hosted sandbox, or the model provider's servers, and none of them has a stable address that belongs only to you. Run the tool in your own code, send only those calls through a fixed-IP proxy, and limit the proxy credential to the partner's hosts.

## Where an agent's tool call comes from

A language model never opens a network connection to your partner. It returns a structured request to call a tool. Some piece of code then makes the HTTP call. The partner's firewall sees the IP of the machine that runs that code, and that is the only address an allowlist can check.

Model vendors draw this line in their docs. Anthropic splits tools into [client tools, which run in your application, and server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) such as `web_search`, `web_fetch`, and `code_execution`, which run on Anthropic's infrastructure. The OpenAI Agents SDK separates the Python functions you register as tools from [hosted tools](https://openai.github.io/openai-agents-python/tools/), which execute on OpenAI's servers. The same agent can use both kinds in one turn, so one conversation can reach the internet from two or three different networks.

_Where a tool call egresses from, by where the tool runs_

| Where the tool runs                                           | IP the partner sees                                       | Can you pin it?                                        |
| ------------------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------------------ |
| Your backend on Lambda, Vercel, Cloud Run, Railway, or Render | A shared platform address that changes over time          | Yes, with the platform's paid static egress or a proxy |
| A VM or long-running container you control                    | The machine's public IP, until it is replaced             | Yes, with a reserved IP or a proxy                     |
| A hosted sandbox such as E2B or Modal                         | The sandbox cloud's addresses, which rotate               | Only through the sandbox's proxy setting               |
| A provider-hosted tool (web fetch, MCP connector)             | The provider's published ranges, shared by every customer | No                                                     |
| Anthropic's code execution container                          | None. The container has no internet access                | Not applicable                                         |

The platform rows are covered in [why serverless egress IPs change](https://fixedmark.com/blog/why-serverless-egress-ips-change). This post covers what is specific to agents. Tool calls come from several places, an agent chooses its own requests, and the partner on the other end usually wants to know exactly what will call it.

## Why a partner will not allowlist your agent's sandbox

Agent sandboxes are built to be thrown away. A new one starts for each session, and its public address is whatever the underlying cloud hands out. Two vendors state this plainly.

- E2B's FAQ says there are [no dedicated or static egress IP addresses on any plan](https://docs.e2b.dev/faq/egress-ip-ranges), including Enterprise. Sandbox traffic leaves from ephemeral public IPs that rotate over time. For its Google Cloud regions, the page points to Google's published ranges and warns that they cover all Google Cloud workloads.
- Modal gives static exit IPs only through [Modal Proxies](https://modal.com/docs/guide/proxy-ips), which are on the Team and Enterprise plans. Without a Proxy, the same function prints a different IP depending on where it runs.

Provider-hosted tools have stable addresses, but they are not yours. Anthropic lists its [outbound ranges](https://platform.claude.com/docs/en/api/ip-addresses) as `160.79.104.0/21` and `153.61.208.0/20`, used for requests such as MCP tool calls to external servers. That is 6,144 IPv4 addresses, and every Anthropic customer's MCP calls and web fetches leave from them. OpenAI's [IP egress ranges page](https://developers.openai.com/api/docs/guides/ip-addresses) says its allowlists identify traffic from an OpenAI-operated network, not a specific user or workspace, and that the ranges can change as its infrastructure changes.

A bank, a payout API, or an enterprise customer's security team will not accept either. Allowlisting a cloud's or a model vendor's ranges admits every other tenant on them, which is the problem described in [cloud IP ranges are not an allowlist](https://fixedmark.com/blog/cloud-ip-ranges-are-not-an-allowlist). They want a short list of addresses that only you send from.

There is a second limit with provider-hosted tools. You cannot attach your own proxy to them. Anthropic's MCP connector, for example, requires the MCP server to be [publicly exposed through HTTP](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector), and the request comes from Anthropic's ranges. If a call must reach a firewalled system, move it into a client tool that runs in your code. The MCP side of this, including which hosts let you pick the egress IP, is in [MCP servers and egress allowlists](https://fixedmark.com/blog/mcp-servers-and-egress-allowlists).

## Proxy the tool calls, not the model calls

Once the tool runs in your code, you can route its HTTP calls through a proxy with a fixed outbound IP. Route only those calls. The model API calls do not need a fixed IP, they carry most of the bytes, and they often stream. Sending them through the proxy adds a hop to every turn, uses proxy bandwidth, and buries the partner calls in the proxy's logs.

Do not set `HTTPS_PROXY` for the whole process. httpx reads `HTTPS_PROXY` by default, and the official Anthropic and OpenAI Python SDKs are built on httpx, so a global variable sends the model calls through the proxy too. Node's built-in `fetch` does the opposite and ignores the variable unless `NODE_USE_ENV_PROXY=1` is set. Store the proxy URL under a name no library reads on its own, such as `EGRESS_PROXY_URL`, and pass it to one client. The rules each tool follows are in [HTTPS_PROXY, NO_PROXY, and per-client agents](https://fixedmark.com/blog/selective-proxying-no-proxy-and-per-client-agents).

The examples below use Anthropic's [tool runner](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-runner), which runs your tool functions when Claude calls them. The pattern carries over to any framework. The tool function owns a proxied HTTP client, and the model client stays direct.

**Python (httpx)**

```python
# pip install anthropic "httpx>=0.28"
import os
import re

import httpx
from anthropic import Anthropic, beta_tool

client = Anthropic()  # model calls go direct

# Partner calls go through the fixed-IP proxy. One client, reused.
partner = httpx.Client(
    base_url="https://erp.partner.example",
    proxy=os.environ["EGRESS_PROXY_URL"],
    headers={"Authorization": f"Bearer {os.environ['PARTNER_API_KEY']}"},
    timeout=15.0,
)

@beta_tool
def get_invoice(invoice_id: str) -> str:
    """Fetch one invoice from the partner ERP.

    Args:
        invoice_id: The invoice id, such as INV-2041
    """
    # The model chose this value. Check it before it reaches a URL.
    if not re.fullmatch(r"INV-\d{1,10}", invoice_id):
        return "Invalid invoice id. Use the form INV-2041."
    res = partner.get(f"/v1/invoices/{invoice_id}")
    res.raise_for_status()
    return res.text

runner = client.beta.messages.tool_runner(
    model="claude-opus-5-5",
    max_tokens=16000,
    tools=[get_invoice],
    messages=[{"role": "user", "content": "Is invoice INV-2041 paid?"}],
)
for message in runner:
    print(message)
```

**TypeScript (undici)**

```typescript
// npm install @anthropic-ai/sdk undici zod
import Anthropic from "@anthropic-ai/sdk";
import { betaZodTool } from "@anthropic-ai/sdk/helpers/beta/zod";
import { fetch, ProxyAgent } from "undici";
import { z } from "zod";

const client = new Anthropic(); // model calls go direct

// Partner calls go through the fixed-IP proxy. One agent, reused.
const fixedIp = new ProxyAgent(process.env.EGRESS_PROXY_URL!);

const getInvoice = betaZodTool({
  name: "get_invoice",
  description: "Fetch one invoice from the partner ERP",
  inputSchema: z.object({
    // The model chose this value. Check it before it reaches a URL.
    invoiceId: z
      .string()
      .regex(/^INV-\d{1,10}$/)
      .describe("The invoice id, such as INV-2041"),
  }),
  run: async ({ invoiceId }) => {
    const res = await fetch(
      `https://erp.partner.example/v1/invoices/${invoiceId}`,
      {
        dispatcher: fixedIp,
        headers: { authorization: `Bearer ${process.env.PARTNER_API_KEY}` },
      },
    );
    if (!res.ok) throw new Error(`Partner returned ${res.status}`);
    return await res.text();
  },
});

const finalMessage = await client.beta.messages.toolRunner({
  model: "claude-opus-5-5",
  max_tokens: 16000,
  tools: [getInvoice],
  messages: [{ role: "user", content: "Is invoice INV-2041 paid?" }],
});
console.log(finalMessage.content);
```

Three details matter here. The proxied client is created once and reused, so each tool call does not pay for a new proxy handshake. The tool checks the id the model produced before it goes into a URL, because a model can be talked into passing `../admin` as easily as `INV-2041`. And the partner's API key lives in the tool's environment, never in the prompt, so the model cannot repeat it.

## Agents that run inside a sandbox

Some agents run their tools inside a sandbox, such as generated code, a headless browser, or a shell. Then the tool call leaves from the sandbox, not from your backend. Set the proxy on the sandbox itself, outside the code it runs, so code the model wrote cannot route around it.

### E2B

E2B's [bring your own proxy](https://docs.e2b.dev/network/byop) feature sends the sandbox's outbound TCP connections through a SOCKS5 proxy you run. You set it when you create the sandbox, and nothing runs inside the guest. It is TCP only, so UDP traffic such as DNS leaves directly. It fails closed, so an unreachable proxy breaks connections instead of letting them go direct. The proxy must be reachable from the public internet.

Name the partner by hostname in `allowOut`. E2B then hands the hostname to the proxy, which resolves it. An IP-literal destination is sent as an address instead, and a proxy rule written for a hostname will not match it.

**sandbox.ts**

```typescript
import { Sandbox } from "e2b";

const sandbox = await Sandbox.create({
  network: {
    // Reach only the partner, by name, and nothing else.
    allowOut: ["erp.partner.example"],
    denyOut: ({ allTraffic }) => [allTraffic],
    // Every allowed TCP connection is dialed through this proxy.
    egressProxy: {
      address: "proxy.example.net:1080",
      username: process.env.PROXY_USERNAME!,
      password: process.env.PROXY_PASSWORD!,
    },
  },
});
```

This sandbox cannot reach the model API, and that is intended. Keep the agent loop on your backend and use the sandbox only to run tools. If the loop runs inside the sandbox, its model calls need an `allowOut` entry too, and they would then go through the proxy as well.

### Modal

A [Modal Proxy](https://modal.com/docs/guide/proxy-ips) is a WireGuard tunnel to exit nodes with static IPs, up to five per Proxy. You create it in your workspace settings and attach it by name. All traffic from that function or sandbox then uses it, model calls included. A Proxy set on a sandbox is not inherited by its sidecars, so set it on each one.

**sandbox.py**

```python
import modal

app = modal.App.lookup("agent-tools", create_if_missing=True)

sb = modal.Sandbox.create(
    app=app,
    proxy=modal.Proxy.from_name("partner-egress"),
)
```

A Proxy with several IPs picks one at random for each run. Give the partner every address on it, not just the one you saw in a test.

## Contain what the agent can reach

Once a partner allowlists your IP, traffic from it is trusted further than traffic from anywhere else. An agent decides its own requests from text it reads, and some of that text may come from an attacker through a web page, an email, or a document. OWASP calls the result [Excessive Agency](https://genai.owasp.org/llmrisk/llm062025-excessive-agency/), with three root causes, excessive functionality, excessive permissions, and excessive autonomy. Each one has a fix that applies to tool calls on a fixed IP.

- Give the agent narrow tools with a fixed host, such as `get_invoice`. Never put a generic `http_get(url)` tool on the proxied client. A generic fetch on the allowlisted path lets an injected prompt use your trusted IP for anything.
- Restrict the proxy credential to the partner's hosts and ports at the proxy. Then a bug or an injection in tool code still cannot reach other hosts from your IP.
- Use one proxy credential per agent or per partner. You can revoke one without breaking the others, and logs show which agent made each call.
- Ask the partner for the narrowest API key that works, such as read-only for lookup tools. OWASP's advice is to enforce authorization in downstream systems instead of trusting the model to decide what is allowed.
- Put a human approval step in front of writes that move money or change records, such as payouts, refunds, or CRM deletes.
- Keep a log of every destination and byte count per connection. When a partner asks what your agent did on a given day, you can answer from records.

An IP allowlist is not authentication. OpenAI's own egress page says its ranges do not replace request authentication or authorization. Keep the partner's API keys, mTLS, or signed requests in place, and treat the fixed IP as one more layer. See [IP allowlists in a zero trust world](https://fixedmark.com/blog/ip-allowlists-in-a-zero-trust-world).

## What to tell the partner's security team

Partners who allowlist IPs usually ask a few questions before they add one, and an AI agent adds more. Send this in the first email and the review goes faster.

1. Two IPv4 addresses, on separate hosts, and a request to add both. One address is a single point of failure, as [static IP pairs and failover](https://fixedmark.com/blog/static-ip-pairs-and-failover) explains.
2. A statement that both addresses send traffic for your account only, not a shared cloud or vendor range.
3. The exact hosts and ports you will call, and that your proxy credential is restricted to them.
4. What the agent does, roughly how often it calls, and which actions need a human to approve them.
5. The authentication on top of the IP check, such as an API key, mTLS certificate, or request signature.
6. A named contact, and how much notice you will give before an address changes.
7. What connection records you keep, for how long, and that they hold metadata, not request bodies.

Indian banks have their own onboarding steps on top of this. See [bank API onboarding and IP whitelisting in India](https://fixedmark.com/blog/bank-api-onboarding-ip-whitelisting-india) before you start that conversation.

## Doing this with Fixedmark

Fixedmark gives an app a pair of static outbound IPv4 addresses in Mumbai, Singapore, Newark, or Ashburn, reached through one proxy URL. It is in early access and not generally available yet. In the examples above, set `EGRESS_PROXY_URL` to your Fixedmark proxy URL, which looks like `https://APP_ID:TOKEN@mum.egress.fixedmark.com:443`. The [Python](https://fixedmark.com/docs/python) and [Node.js](https://fixedmark.com/docs/node) docs list the client versions that support this `https://` proxy URL, and the [AI agents use case](https://fixedmark.com/use-cases/ai-agents-and-automations) has n8n and Deno variants.

For E2B's bring your own proxy, use the SOCKS5 endpoint on port 1080 with `APP_ID` as the username and `TOKEN` as the password. E2B's docs describe plain SOCKS5 with no TLS option, and port 1080 sends the token in cleartext, so put a destination allowlist on that credential.

- [Destination allowlists](https://fixedmark.com/docs/allowlists) restrict each credential to the hosts, CIDR ranges, and ports you list, such as `erp.partner.example:443`. A denied CONNECT gets `403 Forbidden` with `X-Proxy-Error: denied_by_policy`. They come with the Business plan and up.
- [Connection logs](https://fixedmark.com/docs/logs) record the destination, SNI, bytes, egress IP, result, and credential id for every connection. TLS is never decrypted and no content is stored.
- A dedicated pair comes with Pro at a planned $29 a month. The trial runs on a shared pair, so do not register its addresses with a partner. See [pricing](https://fixedmark.com/pricing).

**Terminal**

```bash
# Run from the same runtime as the tool. Prints the IP the partner sees.
# Run it a few times: you should only see the two IPs of your pair.
curl -sS --proxy "$EGRESS_PROXY_URL" https://fixedmark.com/api/ip

# Direct, for comparison. This is the platform's own, changing IP.
curl -sS https://fixedmark.com/api/ip
```

To try it before launch, [join early access](https://fixedmark.com/early-access).

## Sources

Checked November 2026. Confirm current details on the vendor's site before you decide. Prices and limits change.

- [Anthropic: Tool use with Claude](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview)
- [Anthropic: IP addresses](https://platform.claude.com/docs/en/api/ip-addresses)
- [Anthropic: MCP connector](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector)
- [Anthropic: Code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool)
- [Anthropic: Tool runner (SDK)](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-runner)
- [OpenAI: IP egress ranges](https://developers.openai.com/api/docs/guides/ip-addresses)
- [OpenAI Agents SDK: Tools](https://openai.github.io/openai-agents-python/tools/)
- [E2B: Egress IP ranges](https://docs.e2b.dev/faq/egress-ip-ranges)
- [E2B: Bring your own proxy](https://docs.e2b.dev/network/byop)
- [Modal: Proxies](https://modal.com/docs/guide/proxy-ips)
- [OWASP: LLM06:2025 Excessive Agency](https://genai.owasp.org/llmrisk/llm062025-excessive-agency/)
- [HTTPX: Proxies](https://www.python-httpx.org/advanced/proxies/)

Keep reading

## Related guides

- [Use case AI agents and automations Give n8n workflows, Lovable apps, and AI agent tool calls a fixed IP that allowlisted APIs accept.](https://fixedmark.com/use-cases/ai-agents-and-automations)
- [Use case Partner API allowlisting Give Salesforce, SOAP vendors, and payment gateways one dedicated IP pair to allowlist, wherever your code runs.](https://fixedmark.com/use-cases/partner-api-allowlisting)
- [Integration n8n Fixed IPs for n8n HTTP Request nodes on n8n Cloud or self-hosted.](https://fixedmark.com/integrations/n8n)
- [Guide Security How Fixedmark passes TLS through without decrypting it, and what it logs.](https://fixedmark.com/security)
- [Guide Pricing Planned launch plans, from a shared pair to dedicated IPs.](https://fixedmark.com/pricing)

## Frequently asked questions

### Do the model API calls need to go through the static IP?

No. Model providers do not check your IP by default, and those calls carry most of an agent's bytes. Proxy only the tool calls that reach an allowlisted system, and keep the model client direct.

### Can I give Claude's web fetch tool or MCP connector a static IP?

No. Server tools run on Anthropic's infrastructure and leave from Anthropic's published outbound ranges, which every Anthropic customer shares. Move the call into a client tool that runs in your code, and proxy that tool's HTTP client.

### Does E2B offer static egress IPs?

Not on any plan, according to its egress IP FAQ. Its bring your own proxy feature routes sandbox TCP traffic through a SOCKS5 proxy you run, and the partner allowlists that proxy's IP.

### Is it safe to allowlist OpenAI's or Anthropic's published ranges?

Those ranges identify the vendor's network, not your account. Any other customer's agent can send traffic from them. Use them only when the vendor itself is the caller you mean to trust, and never as the only check.

### How many IPs should I give the partner?

Two, on separate hosts, so one failing does not cut off the agent. If your provider picks among more addresses, as a Modal Proxy with several IPs does, give the partner all of them.
