# UPnP Nat

UPnP Nat Client helps to automatically enable port forwarding depending on the network ([gateway identifiers](https://flying-fish.gitbook.io/flyingfish/index/configurations/listen/gateway-identifiers)) on the router.

{% hint style="info" %}
Upnp-Nat must be activated on the router. With the Fritzbox you have to allow UPnP-Nat for a host device.
{% endhint %}

## List

All port forwarding can be seen in the list, per [Gateway identifiers](https://flying-fish.gitbook.io/flyingfish/index/configurations/listen/gateway-identifiers) and [Listen](https://flying-fish.gitbook.io/flyingfish/index/configurations/listen)/port.

<figure><img src="https://1973811904-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Flk5l3lUfuUzRDnMDVwnw%2Fuploads%2F5R3zrkiiUdLYbGyODOGY%2Fupnpnat_list.png?alt=media&#x26;token=4b391a1e-d84e-42df-8d5e-5022297cf406" alt=""><figcaption></figcaption></figure>

1. Adds a new port forwarding for UPnP Nat.
2. Entries for UPnP Nat.

#### Status

Gray status shows that we are not currently in the gateway, these port forwarding are being ignored.&#x20;

A <mark style="color:red;">red status</mark> indicates that port forwarding could not be set up automatically. This could be a problem with:

{% hint style="danger" %}

* UPnP Nat is not active on the router
* The device does not have permission for UPnP Nat. (e.g. Fritzbox)
* The port is already taken and cannot be released again.
  {% endhint %}

The <mark style="color:green;">green status</mark> indicates that port sharing has been set up.

## Add

Adds UPnP Nat port forwarding:

<figure><img src="https://1973811904-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Flk5l3lUfuUzRDnMDVwnw%2Fuploads%2F2fYazeI7RG6zE4vTsXxo%2Fupnpnat_edit.png?alt=media&#x26;token=c61dc01b-bce8-4f10-8c4a-4f9482fc9c52" alt=""><figcaption></figcaption></figure>

1. **Gateway network assignment**: Select your gateway. The gateways of "[Gateway identifiers](https://flying-fish.gitbook.io/flyingfish/index/configurations/listen/gateway-identifiers)" are displayed here.
2. **Gateway address**: Enter the IP address of the gateway (router) on which UPnP Nat is requested.
3. **Public port**: Port that is opened to the Internet.
4. **Client address**: Enter the target IP address here. If it is FlyingFish and not another application from another system, you can simply use the "Use Host address by DHCP".&#x20;

{% hint style="info" %}
When activating "Use Host address by DHCP" the host's IP, which it received as an IP, is always used automatically.
{% endhint %}

5. **Privat port**: Here you enter the port which is located in the network and which should be released to the outside world on the Internet.  Or select a [Listen](https://flying-fish.gitbook.io/flyingfish/index/configurations/listen) directly.
6. **TTL**: The time (in seconds) for how long the [port forwarding](https://flying-fish.gitbook.io/flyingfish/index/configurations/listen/port-forwarding) requested by the client is valid. Default is 36000 seconds.
7. **Protocol**: What protocol is used for [port forwarding](https://flying-fish.gitbook.io/flyingfish/index/configurations/listen/port-forwarding)? The router then only passes on this protocol. TCP and UDP can be selected.
8. **Description**: Description for [port forwarding](https://flying-fish.gitbook.io/flyingfish/index/configurations/listen/port-forwarding).

<figure><img src="https://1973811904-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Flk5l3lUfuUzRDnMDVwnw%2Fuploads%2F5mWcQLNLW7yDtx89NJe2%2F80bxpq.jpg?alt=media&#x26;token=92ac11cf-1e0c-4446-b6e5-add0e05d9035" alt=""><figcaption><p>Generate by <a href="https://imgflip.com/i/80bxpq">https://imgflip.com/i/80bxpq</a></p></figcaption></figure>
