# How to Create and Configure Gateways

{% embed url="<https://youtu.be/_tYAauDrnSg>" %}

### Purpose

Understanding and Configuring Gateways in Netmaker

### Introduction to Netmaker Gateways

Netmaker Gateways serve as the essential routing points within an overlay network, acting as hubs that facilitate traffic flow between the core Netmaker network and various endpoint devices. They are fundamental to ensuring that devices across different environments can reach the internal network and vice versa.

Additionally, when a direct P2P connection cannot be forged between devices, Netmaker automatically initiates connection over Gateways which have been set as "Auto Relay", their default setting.

#### Gateway Architecture and Supported Endpoints

At its core, a gateway functions as a router. It manages the communication between the Netmaker Network and three specific types of endpoints:

* **User Devices:** Personal devices connecting to the network through client software.
* **WireGuard Configurations:** Standard configuration files that allow non-Netclient devices to participate in the network.
* **Netclients:** Specific nodes where routing through a gateway is preferred over a standard peer-to-peer connection.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/b7ca845d-3229-4dfc-91e7-390d098224c1-screenshot_0_10.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183251Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=e9295d212ec1da6f4e4416ff479d0a2a52f6f020c405ebe57e972a25a73296ac" alt=""><figcaption></figcaption></figure>

In addition to internal network routing, a gateway can be configured as an **Internet Gateway**. This capability enables "full-tunnel" traffic, allowing connected devices to route all their public internet traffic through the gateway, providing a secure egress point for the entire network.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/a870b560-777d-493d-bd61-ea9e3d6c46fa-screenshot_1_32.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183250Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=6d5535a48525b94bbbbe43b00b72eb57304b7af35ac61168095b75345852ee0c" alt=""><figcaption></figcaption></figure>

#### Identifying Gateways in the Netmaker Dashboard

To view and manage the routing points in your network, you must navigate to the dashboard interface. Every network requires at least one enabled gateway to properly route traffic from user devices and WireGuard configuration files.

1. Open the Netmaker Dashboard and navigate to the **Nodes** section using the sidebar menu.
2. Locate specific machines, such as a **demo-server**, to check their current status.
3. Identify active gateways by looking for a blue **GATEWAY** tag appearing beneath the device name.
4. Hover over the tag to confirm that the node is ready to serve as a routing point for other devices in the network.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/df60bfa8-ba7a-496b-b7aa-13236564e919-screenshot_2_52.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183251Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=3f931005aac1cc10b7b3d76252b4f0d9a1d8496f45c9734bf5af091f103b9d89" alt=""><figcaption></figcaption></figure>

### Attaching WireGuard Configs and Nodes

In Netmaker, gateways act as routing hubs for various network entities. To ensure traffic flows correctly between your overlay network and external devices, you must attach WireGuard configuration files and network nodes to a designated gateway.

#### Creating and Attaching WireGuard Config Files

When generating a new WireGuard configuration file, you must specify which gateway will handle its traffic. This is essential for devices that do not run the native netclient but still need to participate in the network.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/5ae23064-d6bc-4fb5-a5a8-d79a8c992087-screenshot_3_74.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183251Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=d12749e8e25b19d6d153043aa4c0e64172ef2ff7a24ab18df5e3b6ccc6ee19e1" alt=""><figcaption></figcaption></figure>

1. Navigate to the **Nodes** section in the sidebar and select the **Config files** tab.
2. Click **Add device** and ensure the **Config files** method is selected.
3. Enter a unique **Node name** (e.g., 'my-router-1').
4. Use the **Select node as gateway** dropdown to choose an active gateway, such as 'cloud-linux'.
5. Click **Create Config** to finalize the attachment.

Once created, you can verify the association by navigating to the **Gateways** section and expanding the specific gateway to view its attached configuration files.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/3883f415-adcf-4aac-a236-6f88d5012728-screenshot_4_94.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183251Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=caf069dd8c9af18f0b6ff85922add6dbfcfdf9d8b0e217246861a839a8b56efb" alt=""><figcaption></figcaption></figure>

#### Assigning Gateways to Existing Nodes

Beyond configuration files, standard Netmaker nodes (netclients) can also be routed through a specific gateway. This is particularly useful for site-to-site connectivity or when certain nodes require a centralized exit point.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/f1db9140-fd2f-4a08-9255-78a665122dd0-screenshot_5_112.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183251Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=cbc15a73049ceb883cbb784dd9c9339f5e2628f78d26c319c4350256344f3e8a" alt=""><figcaption></figcaption></figure>

1. In the **Nodes** dashboard, switch to the **Devices** tab.
2. Identify the target node (e.g., 'site-linux-1') and click the **Assign Gateway +** button in its row.
3. In the modal, select the checkbox for the desired gateway (e.g., 'demo-server').
4. Click **Assign Gateway** to apply the routing changes.

After assignment, the gateway management page will reflect the new connection under the **Connected Nodes** sub-tab for that gateway.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/1d2f6920-470a-4920-be12-bfd6b990be58-screenshot_6_124.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183251Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=72f3a5a19d9414e4def681a8c431973f0d372365655a0f70ff456b4b8b620e04" alt=""><figcaption></figcaption></figure>

### Auto-Relaying Traffic

By default, Gateways will relay traffic between your devices, in case peer-to-peer connections cannot be established. When editing the Gateway, you can choose to disable this feature by toggling the Auto Relay feature:

<figure><img src="https://1465744049-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSqMcN3gvfPLhO0hh4agC%2Fuploads%2FBIoA7D24PHxjya6oRFGK%2FScreenshot%202026-01-21%20at%201.18.49%E2%80%AFPM.png?alt=media&#x26;token=a4109bc9-c265-4c9f-a84d-80020b096ca3" alt=""><figcaption></figcaption></figure>

### Connecting User Devices through Gateways

For end-users, the Netmaker Desktop application provides a streamlined interface for connecting to overlay networks. Instead of manual configuration, users can dynamically select which gateway routes their traffic directly from the client interface.

#### Authenticating the Desktop Client

To begin, launch the Netmaker Desktop application on your local machine. You will be prompted to authenticate using your network credentials. Enter your **Username** and **Password** to access the list of available networks and resources.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/9b32ca93-be5a-4b33-a210-0c3930a932ac-screenshot_7_138.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183252Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=d07347e9f7e71fed5f0495471c16a5c9b0c50755e5f0687fe291a2750306a1b0" alt=""><figcaption></figcaption></figure>

#### Selecting Networks and Gateways

Once logged in, the application displays the networks you are authorized to join. To configure a connection:

1. Identify your target network (e.g., **cloud-overlay**) from the network list.
2. Expand the network details to reveal connection settings.
3. Use the **Gateway** dropdown menu to select the specific routing node you wish to use, such as the **demo-server**.&#x20;

By default, without selecting a Gateway, the application will automatically select the fastest route amongst the available Gateways.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/fd05e72d-c29e-4eca-affb-70a665f06ff5-screenshot_8_142.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183251Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=4c429fcc310e03ecc8182070c77ff008244ea0a430a76f84c16ddee4eeb45553" alt=""><figcaption></figcaption></figure>

#### Establishing the Connection

After selecting the desired gateway, click the toggle switch next to the network name. The client will establish a secure WireGuard tunnel to the selected gateway, integrating the device into the virtual overlay network.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/93bdd25f-e913-4ba6-8ce5-e731aaf9ab91-screenshot_9_152.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183252Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=7f1b9c131f88343f807e7530255706b94c2df2644ad4b8f1c3343a720e73fc35" alt=""><figcaption></figcaption></figure>

#### Verifying Connection Status

Administrators can monitor these active user sessions from the Netmaker Dashboard. By navigating to the **Gateways** management page and expanding the specific gateway used (e.g., **demo-server**), you can view the **Connected Users** tab. This section provides real-time confirmation of the user's presence, displaying their assigned private IP address and connection status.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/68720a37-8b9e-4eaf-ba46-4641d9191955-screenshot_10_156.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183252Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=a1d1299bd5c1530931b9c13a2c23f41bd2827b83e8011fef97302e6aa56896db" alt=""><figcaption></figcaption></figure>

### Advanced Gateway Options and DNS Configuration

For more granular control over network traffic, Netmaker allows you to configure advanced gateway settings, including full-tunnel internet routing and customized DNS resolution. These settings are typically configured during the gateway creation process or by modifying an existing gateway node.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/fbf5d8e4-b0ec-4abb-880c-0d2e2da4227f-screenshot_11_174.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183251Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=2912873a32f5881cb98e3125c74c8b38bc5b4b955f8d194bb0b2ee90bb66e2bb" alt=""><figcaption></figcaption></figure>

#### Setting Up an Internet Gateway

To enable a node to act as an internet gateway, you must toggle the **Set as an Internet Gateway** option during setup. This configuration enables "full tunnel" mode, where all traffic from connected devices is routed through the gateway node before reaching the public internet. This is particularly useful for establishing secure internet access VPNs.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/1c6b877f-5db6-48ca-a98d-302dd007b948-screenshot_12_186.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183252Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=9830050fe9199581e7ebcb821eab90d3eba743862cd7e3d0d1ce6edcd1d0039e" alt=""><figcaption></figcaption></figure>

1. In the **Gateways** management tab, locate the node you wish to configure.
2. If the node is already a gateway, you may need to delete and recreate the gateway entry to access all configuration options.
3. In the **Create Gateway** modal, select your target Linux node from the dropdown.
4. Toggle the **Set as an Internet Gateway** switch to the **ON** position.

### Conclusion and Summary

Netmaker gateways provide a flexible routing architecture that centralizes traffic management for various network entities. By acting as a primary router, a gateway facilitates communication between the Netmaker Network and external endpoints, ensuring that traffic is directed efficiently and securely.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/0522ff4c-5b4b-4047-a282-273c9770a47e-screenshot_15_300.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183252Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=d2cdfe0481d14e873c84ae0cb9b260ac5796022022c87a8d715d93c1a213b24c" alt=""><figcaption></figcaption></figure>

#### Key Gateway Use Cases

A Netmaker gateway supports three primary routing scenarios for devices within or connected to your overlay network:

* **User Devices:** Managing secure access for remote users connecting via the desktop application.
* **WireGuard Config Files:** Routing traffic to and from standard WireGuard configuration files (non-netclient devices).
* **Netclients and Nodes:** While Netmaker defaults to a peer-to-peer model, you can optionally configure specific netclient nodes to route their traffic through a gateway.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/c38a0761-dc3c-4f36-acff-d21b1c573d36-screenshot_16_304.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183252Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=9601fea7d0c2968a887a69bb4102d935bdc9bf8e72befc6b6556a9f268fdaf9e" alt=""><figcaption></figcaption></figure>

#### Full Tunnel Internet Access

Beyond internal network routing, gateways can be configured for Internet access. This "Full Tunnel" setup enables all traffic from a connected device to be routed through the gateway out to the public internet, effectively acting as a professional VPN service for your infrastructure.

<figure><img src="https://limesync-general-production.000da24485a2eb1df827157d23f74fdc.r2.cloudflarestorage.com/c0d109fb-1725-4769-a8ed-443da5e18a40/6681c732-5ec0-44f2-a03e-ba3f00c20d36/b10b72d3-a81d-4eb5-89f2-7447f9adcece/e9bc92c8-f004-464b-99a0-fae49d69dac9-screenshot_17_318.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&#x26;X-Amz-Credential=934e8b232ee153ba21e195ef724a2066%2F20260121%2Fauto%2Fs3%2Faws4_request&#x26;X-Amz-Date=20260121T183253Z&#x26;X-Amz-Expires=3600&#x26;X-Amz-SignedHeaders=host&#x26;X-Amz-Signature=443aa384d55cb1fc3e5395159bcd9c11383350f66f4978fe264cbd5a09fe1064" alt=""><figcaption></figcaption></figure>

Whether managing internal site-to-site connectivity or providing secure internet egress, the gateway system provides the necessary control to scale network architecture according to specific organizational needs.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.netmaker.io/getting-started/walkthrough/how-to-create-and-configure-gateways.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
