> 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="/files/B12mLq361UmpkODSFAu2" 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="/files/y2UqgGGNAjeMogAkKyBs" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Socks4" %}

<figure><img src="/files/U1rjwPj8LwYnUfepMjvE" alt=""><figcaption></figcaption></figure>
{% endtab %}

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

<figure><img src="/files/q0TFcjjJZzC2EBH1LDvP" alt=""><figcaption></figcaption></figure>
{% endtab %}

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

<figure><img src="/files/5DUiChhTplC3lftVsomm" 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.&#x20;

<figure><img src="/files/OW9DV7bkm7mXSnq1b6wB" 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="/files/GBCvZfdGXOdCsZTC80NR" 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="/files/qqZ5xxscyNCS7SkOu2e6" 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="/pages/Pt76BxhboepLTqtwUXiL">/pages/Pt76BxhboepLTqtwUXiL</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="/pages/VDj56LG8Xn0tuXsXPltO">/pages/VDj56LG8Xn0tuXsXPltO</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>
