Skip to content
19 changes: 15 additions & 4 deletions docs/HowTo/Find-and-Connect/Specifying-NAT.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,33 @@ By specifying `MANUAL`:
[`rpc-http-port`](../../Reference/CLI/CLI-Syntax.md#rpc-http-port) define the advertised host and
port for the JSON-RPC service.

## Kubernetes

Specify `KUBERNETES` to explicitly specify Hyperledger Besu is running inside a Kubernetes cluster.
Besu automatically detects if it is running inside of a Kubernetes cluster and interacts with
Kubernetes APIs as required to determine external IP addresses and exposed ports. The configuration
is stored in `/opt/besu/shared/kube-config`.

## Docker

Specify `DOCKER` to explicitly specify Hyperledger Besu is running inside a Docker container. If
you specify `DOCKER`, you advertise the host IP address not the container IP address.

The host IP is the advertised host specified in the
The host IP address is the advertised host specified in the
[`docker run` command](https://docs.docker.com/engine/reference/commandline/run/#add-entries-to-container-hosts-file---add-host).
If not specified in the `docker run` command, the advertised host defaults to the values for
[`--p2p-host`](../../Reference/CLI/CLI-Syntax.md#p2p-host) and
[`--p2p-port`](../../Reference/CLI/CLI-Syntax.md#p2p-port).

## Auto

`AUTO` is the default NAT method. `AUTO` detects if Besu is running inside Docker container. If
inside a Docker container, `AUTO` acts as if you specified [`DOCKER`](#docker). If not inside a
Docker container, `AUTO` acts as if you specified [`NONE`](#none).
`AUTO` is the default NAT method. `AUTO` detects if Besu is running inside a Kubernetes cluster or
a Docker container. If running inside:

* A Kubernetes cluster, `AUTO` acts as if you specified [`KUBERNETES`](#kubernetes).
* A Docker container, `AUTO` acts as if you specified [`DOCKER`](#docker).
* Neither a Kubernetes cluster nor a Docker container, `AUTO` acts as if you specified
[`NONE`](#none).

## None

Expand Down
24 changes: 19 additions & 5 deletions docs/Reference/CLI/CLI-Syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -767,16 +767,30 @@ Default is 1000.
nat-method="UPNP"
```

Specify the method for handling [NAT environments](../../HowTo/Find-and-Connect/Specifying-NAT.md).
Options are: [`UPNP`, `MANUAL`, `DOCKER`, `AUTO`, and `NONE`](../../HowTo/Find-and-Connect/Specifying-NAT.md).
Specify the method for handling [NAT environments](../../HowTo/Find-and-Connect/Specifying-NAT.md).
The options are:

* [`UPNP`](../../HowTo/Find-and-Connect/Specifying-NAT.md#upnp)
* [`MANUAL`](../../HowTo/Find-and-Connect/Specifying-NAT.md#manual)
* [`KUBERNETES`](../../HowTo/Find-and-Connect/Specifying-NAT.md#kubernetes)
* [`DOCKER`](../../HowTo/Find-and-Connect/Specifying-NAT.md#docker)
* [`AUTO`](../../HowTo/Find-and-Connect/Specifying-NAT.md#auto)
* [`NONE`](../../HowTo/Find-and-Connect/Specifying-NAT.md#none).

The default is `AUTO`. `NONE` disables NAT functionality.

!!!tip
UPnP support is often disabled by default in networking firmware. If disabled by default, explicitly enable UPnP support.

UPnP support is often disabled by default in networking firmware. If disabled by default,
explicitly enable UPnP support.

!!!notes
* Option `UPNP` might introduce delays during node startup, especially on networks where no UPnP gateway device can be found.
* `--nat-method=DOCKER` must be specified when using the [Besu Docker image](../../HowTo/Get-Started/Run-Docker-Image.md).

Specifying `UPNP` might introduce delays during node startup, especially on networks without a
UPnP gateway device.

You must specify `DOCKER` when using the
[Besu Docker image](../../HowTo/Get-Started/Run-Docker-Image.md).

### network

Expand Down