> For the complete documentation index, see [llms.txt](https://adaptix-framework.gitbook.io/adaptix-framework/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://adaptix-framework.gitbook.io/adaptix-framework/adaptix-c2/tunnels-and-forwarding.md).

# Tunnels and Forwarding

AdaptixC2 provides the ability to use several pivot options. For each of these options, you need to make sure that yours agent supports a specific feature and is in interactive mode (sleep 0). By default, the agent is not put into interactive mode.

### Create tunnels

Create a tunnel using the **Create Tunnel** context menu of the session table or graph if the agent supports one of the tunnel types.

<figure><img src="https://2104178602-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS8p8XLFtLmf0NkofQvoa%2Fuploads%2Fgit-blob-99e07f7ee7dfb124813dfd6652c52bfc80fd01dd%2FScreenshot_20250727_223330.png?alt=media" alt=""><figcaption></figcaption></figure>

AdaptixC2 supports the following types of network tunnels:

* SOCKS4
* SOCKS5 (with/out Auth) TCP/UDP (IPv4, DNS, **not IPv6**)
* Local TCP Port Forwarding
* Reverse TCP Port Forwarding

{% tabs %}
{% tab title="Socks5" %}

<figure><img src="https://2104178602-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS8p8XLFtLmf0NkofQvoa%2Fuploads%2Fgit-blob-9c97b2c7a8e16c8039f6668f0781c20a8d7accea%2FScreenshot_20250528_133227.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Socks4" %}

<figure><img src="https://2104178602-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS8p8XLFtLmf0NkofQvoa%2Fuploads%2Fgit-blob-70c4abf79552c8c57c583d03aee307a5108217f2%2FScreenshot_20250528_133233.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Local port Forwarding" %}

<figure><img src="https://2104178602-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS8p8XLFtLmf0NkofQvoa%2Fuploads%2Fgit-blob-7fc30fb46c6ad1da9734f00c6dab75a776f3c143%2FScreenshot_20250528_133238.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Reverse port Forwarding" %}

<figure><img src="https://2104178602-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS8p8XLFtLmf0NkofQvoa%2Fuploads%2Fgit-blob-44e0e1130ff99701e033342d707bede215067d57%2FScreenshot_20250528_133244.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

AdaptixC2 allows you to build tunnels not only through the C2 teamserver (route: `-> C2 -> agent -> target`), but also through AdaptixClient.

<figure><img src="https://2104178602-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS8p8XLFtLmf0NkofQvoa%2Fuploads%2Fgit-blob-bdb85ef8441fbd3f90c4ff2bf98248a18a304a99%2FScreenshot_20250528_133325.png?alt=media" alt=""><figcaption></figcaption></figure>

In this case, the port is opened on the client and the traffic is directed along the path: `-> Client -> C2 -> agent -> target`.

### Tunnel manager

Created tunnels are managed via the tunnel manager.

<figure><img src="https://2104178602-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS8p8XLFtLmf0NkofQvoa%2Fuploads%2Fgit-blob-fd4ca23deee90661f27ef697aa87f6ade67b5999%2FScreenshot_20250225_001926.png?alt=media" alt=""><figcaption></figcaption></figure>

The context menu of the Tunnels Table allows you to set information about the tunnel and stop the tunnel.

<figure><img src="https://2104178602-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS8p8XLFtLmf0NkofQvoa%2Fuploads%2Fgit-blob-8b8f28f18022b2e00a9e5331bf70a5a83c476c29%2FScreenshot_20250225_001938.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Management of tunnels running through a client is available only to the user through whose client the tunnel is running
{% endhint %}

### Pivots support

<table><thead><tr><th width="237">Agent</th><th width="78" align="center">Socks4</th><th width="78" align="center">Socks5</th><th width="115" align="center">Socks5 UDP</th><th width="124" align="center">Local fwd</th><th align="center">Reverse fwd</th></tr></thead><tbody><tr><td><a data-mention href="/adaptix-framework/extenders/agents/beacon.md">Beacon</a></td><td align="center">+</td><td align="center">+</td><td align="center">+</td><td align="center">+</td><td align="center">+</td></tr><tr><td><a data-mention href="/adaptix-framework/extenders/agents/gopher.md">Gopher</a></td><td align="center"></td><td align="center">+</td><td align="center"></td><td align="center"></td><td align="center"></td></tr></tbody></table>
