---
schema_version: "1"
id: e9c2bc8a99150d709907ce9f93b3af2f32ef08d06870bfb600b64ab032571d11
title: Configuring PROXY Protocol in Connected Mode
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/1.13/conn-proxy-protocol.md
canonical_url: https://docs.mulesoft.com/gateway/1.13/conn-proxy-protocol
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 34c7709e85d1fe5d522e1e523a87cf96de130284693b09ebf6d17c374d6a1821
description: MuleSoft Documentation Site
release: "1.13"
latest: false
---
---
product: Omni Gateway
version: 1.13
---

# Configuring PROXY Protocol in Connected Mode

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

For use cases when Omni Gateway is deployed behind a load balancer or other proxy service, configure
PROXY protocol to preserve client IP addresses across multiple layers of NAT or TCP proxies.

In PROXY protocol, the load balancer or other proxy service sends the PROXY protocol header
containing the client address and additional information to Omni Gateway. To learn more about PROXY
protocol, see the
[HAProxy specification](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt).

Enabling PROXY protocol only enables Omni Gateway to receive the PROXY protocol header. Your load
balancer or other proxy service must support PROXY protocol to transmit the header.

<table><colgroup><col> <col> <col></colgroup><tbody><tr><td><div><div><p><span><a href="#linux"><img src="https://docs.mulesoft.com/gateway/1.13/_images/install-linux-logo.png" alt="20%" width="20%"></a></span></p></div></div></td><td><div><div><p><span><a href="#docker"><img src="https://docs.mulesoft.com/gateway/1.13/_images/install-docker-logo.png" alt="25%" width="25%"></a></span></p></div></div></td><td><div><div><p><span><a href="#kubernetes"><img src="https://docs.mulesoft.com/gateway/1.13/_images/install-kubernetes-logo.png" alt="20%" width="20%"></a></span></p></div></div></td></tr><tr><td><div><div><p><a href="#linux">Enable PROXY Protocol for Omni Gateway as a Linux Service</a></p></div></div></td><td><div><div><p><a href="#docker">Enable PROXY Protocol for Omni Gateway in a Docker Container</a></p></div></div></td><td><div><div><p><a href="#kubernetes">Enable PROXY Protocol for Omni Gateway in a Kubernetes Cluster</a></p></div></div></td></tr></tbody></table>

## Before You Begin

Before enabling PROXY protocol for Omni Gateway, complete the following tasks:

1.  [Download Omni Gateway](https://docs.mulesoft.com/gateway/1.13/install)

2.  [Register and Run Omni Gateway](https://docs.mulesoft.com/gateway/1.13/conn-reg-run)

## Enable PROXY Protocol for Omni Gateway as a Linux Service

1.  Create a YAML configuration file in the Omni Gateway configuration directory:

    ```ssh
    sudo touch /usr/local/share/mulesoft/flex-gateway/conf.d/proxy-protocol-config.yaml
    ```

2.  Update the file with the PROXY protocol configuration file:

    ```yaml
    apiVersion: gateway.mulesoft.com/v1alpha1
    kind: Configuration
    metadata:
      name: config
    spec:
      proxyProtocol:
        enabled: true
    ```

## Enable PROXY Protocol for Omni Gateway in a Docker Container

> [!NOTE] If you have already added a volume for a folder with your Omni Gateway configuration
> files, skip to the last step.

1.  Press Ctrl+C to stop your Omni Gateway and any replicas.

2.  Create a folder named `app` in the directory with your Omni Gateway configuration files.

3.  Restart your Omni Gateway with an additional volume for the new `app` directory:

    ```ssh
    docker run --rm \
    -v "$(pwd)":/usr/local/share/mulesoft/flex-gateway/conf.d \
    -p 8080:8080 \
    mulesoft/flex-gateway
    ```

    > [!NOTE] Specify an optional name you want to assign to your Omni Replica by including the
    > following: `-e FLEX_NAME=<name-for-flex-replica> \`.

4.  Create and save a YAML configuration file in your `app` folder with your PROXY protocol
    configuration details.

    ```yaml
    apiVersion: gateway.mulesoft.com/v1alpha1
    kind: Configuration
    metadata:
      name: config
    spec:
      proxyProtocol:
        enabled: true
    ```

## Enable PROXY Protocol for Omni Gateway in a Kubernetes Cluster

To configure PROXY protocol for Omni Gateway, create a new resource using a YAML configuration file
with your PROXY protocol details.

```yaml
apiVersion: gateway.mulesoft.com/v1alpha1
kind: Configuration
metadata:
  name: config
spec:
  proxyProtocol:
    enabled: true
```

## See Also

- [HAProxy specification](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt)
