> For the complete documentation index, see [llms.txt](https://docs.islandrouter.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.islandrouter.com/island-router-cli-2.3.2/commands/ip-global-context/ip-port-forward.md).

# ip port-forward

Create a permanent Destination Network Address Translation (DNAT) entry.

## Syntax

```
ip port-forward tcp|udp [<public-ip>:]<public-port> <mac>|island [<dest-port>]
```

## Syntax Description

<table><thead><tr><th width="203">Keyword</th><th>Description</th></tr></thead><tbody><tr><td><code>tcp</code></td><td>Creates a TCP DNAT entry.</td></tr><tr><td><code>udp</code></td><td>Creates a UDP DNAT entry.</td></tr><tr><td>public-ip</td><td>(Optional) Specifies the IP address on which to accept incoming connections to be port-forwarded. If omitted, connections will be accepted on any of the Island's interface addresses.</td></tr><tr><td>public-port</td><td>The TCP or UDP port number on which to accept incoming connections.</td></tr><tr><td>mac</td><td>The MAC address of the device to which incoming connections are to be forwarded.</td></tr><tr><td><code>island</code></td><td>Specifies that incoming connections are to be forwarded to the Island itself.</td></tr><tr><td>dest-port</td><td>(Optional) The TCP or UDP port number on the target system. If omittied, the original destination port number is unmodified.</td></tr></tbody></table>

## Defaults

By default, port-forwarded connections will be accepted on any of the Island's interface IP addreses, and the destination port number will not be modified.

## Usage Guidelines

Island normally blocks all inbound connection attempts from the Internet (i.e., on WAN ports) or on other internal networks (LANs) to internal devices. This command provides a method to allow inbound connections to specific internal devices (or to the Island itself) on specific TCP and UCP ports. In essence, it opens a "hole" in the internal stateful firewall for specific internal services.

If the public IP address is not specified, connections will be accepted an any of Island's interface addresses on the specified TCP or UDP port. Use care when doing this on ports used for internal management (e.g., TCP ports 22, 443, and 4443) or incoming VPN connections (UDP port 51820 or as defined by the [vpn port](https://docs.islandrouter.com/island-router-cli-2.3.2/commands/vpn-port.md) command, and UDP port 3006) as the port-forward will make those services unavailable on those ports.&#x20;

If the public IP address is specified, connections will be accepted only on that address.

The maximum number of port-forward commands is 1024.

## Examples

```
ip port-forward tcp 3074 00:00:5e:00:53:7a
```

## Related Commands


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.islandrouter.com/island-router-cli-2.3.2/commands/ip-global-context/ip-port-forward.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
