> ## Documentation Index
> Fetch the complete documentation index at: https://docs.browserbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IP allowlisting

> Route Browserbase traffic through your VPN by allowlisting proxies.

Use this setup when you need to allowlist Browserbase traffic through your firewall or API gateway.

By routing traffic through your own static proxy or VPN, you can:

* Pass network traffic through allowlisted infrastructure
* Control your browser's IP address and location
* Comply with internal security policies, firewalls, and access controls

## How to route Browserbase through your VPN

Browserbase sessions can route traffic through your own static HTTP, HTTPS, or SOCKS5 proxy.

This lets you control the outbound IP. If your systems only allow traffic from trusted IPs, allowlist the IP of your proxy.

1. Deploy a VPN or proxy server in your trusted network
2. Allowlist that IP in your firewall, backend, or third-party system
3. Pass the proxy config into your Browserbase session
4. Browserbase routes browser traffic through your proxy

## Custom proxy configuration

> [tab] Node.js
>
> ```typescript Node.js create_session_with_proxy.js theme={null}
> import { Browserbase } from "@browserbasehq/sdk";
>
> const bb = new Browserbase({ apiKey: process.env.BROWSERBASE_API_KEY! });
>
> async function createSessionWithCustomProxies() {
>   const session = await bb.sessions.create({
>     proxies: [
>       {
>         type: "external",
>         server: "http://...",
>         username: "user",
>         password: "pass",
>       },
>     ],
>   });
>   return session;
> }
>
> const session = await createSessionWithCustomProxies();
> ```

> [tab] Python
>
> ```python Python create_session_with_proxy.py theme={null}
> from browserbase import Browserbase
> import os
>
> bb = Browserbase(api_key=os.environ["BROWSERBASE_API_KEY"])
>
>
> def create_session_with_custom_proxy():
>     session = bb.sessions.create(
>         proxies=[
>             {
>                 "type": "external",
>                 "server": "http://...",
>                 "username": "user",
>                 "password": "pass",
>             },
>         ]
>     )
>     return session
>
>
> session = create_session_with_custom_proxy()
> ```

## Key requirements

* Your proxy must support HTTP, HTTPS, or SOCKS5
* It must be accessible from Browserbase (public IP or via tunnel)
* You must allow traffic from Browserbase to your proxy (firewall, VPN config, etc.)

## Troubleshooting

If your session fails to connect:

* Make sure your proxy server is publicly accessible or properly tunneled
* Confirm the proxy IP is correctly allowlisted in your system
* Check the proxy authentication credentials
* Ensure the proxy URL uses `http://`, `https://`, `socks5://`, or `socks5h://` (Browserbase doesn't support SOCKS4 proxies)
* Try connecting to the proxy from a local machine to verify it works outside your network

> [card] [Proxies](https://docs.browserbase.com/platform/identity/proxies.md)
>
> Read more about using custom proxies and proxy configuration options.

> [card] [Enterprise security](https://docs.browserbase.com/account/enterprise/security.md)
>
> Learn how Browserbase manages enterprise security and compliance.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.