Network & Tunnels
Neti is also a WireGuard hub. A backend connected with a tunnel needs no open port on the Internet and no public IP address: Neti reaches it at its address inside the tunnel, and only Neti can. This section creates the hub, adds and removes the clients (backends, but also laptops and phones of administrators), gives you the configuration to install on each of them and shows who is connected. Everything is done from the console, with no command line on the Neti server.
Where: menu Network & Tunnels. Permission view.network to see the page (Viewer, Operator and Admin by default); manage.network to initialize the hub, add, export, disable and delete clients and change the hub settings (Operator and Admin by default). Without manage.network the page is read-only: the buttons, the action column and the Hub settings box are not shown.
The page describes the WireGuard tunnel only. The firewall rules of the server are in Firewall; timed access to servers behind the tunnel is in Remote access.

Initialize the WireGuard hub
On a server where no tunnel exists yet, the page shows only the box Initialize the WireGuard hub (No tunnel is configured on this server yet…). Users without the network management permission see This needs the network management permission instead of the form.
- Server IP (hub)
- The address of the Neti server inside the tunnel. Default
10.9.0.1. It must be an IPv4 address; choose a private network that is not used by the networks of your backends, otherwise the backend would not know which way to send the packets. - Subnet prefix (/n)
- The size of the tunnel network, from 8 to 30. Default
24(254 addresses, enough for almost every installation). The tunnel subnet is built from the first three numbers of the server IP: with10.9.0.1and/24it is10.9.0.0/24. - WireGuard port
- The UDP port the hub listens on. Default
51820. Neti opens it in the firewall of the server; if a firewall of your hosting provider stands in front of the server, open this UDP port there too. - Public endpoint (for clients)
- The public name or address that clients use to reach the hub; it is written in every client configuration. It is pre-filled with the public IP of the server. Enter a host name or an IP address, without the port.
- 🚀 Initialize hub
- Creates the key pair of the server, the interface
wg0with the chosen address and port, starts it, enables it at boot and opens the UDP port in the firewall. The answer is WireGuard hub initialized. You can now add clients.
WireGuard hub (this server)
Once the hub exists, the first box summarizes it. These are the values that end up in the configuration of every client.
- Endpoint (for clients)
- Public name or address and UDP port that clients connect to, for example
203.0.113.10:51820. If no public endpoint is set, the public IP of the server is used. - Tunnel subnet
- The network of the tunnel and, after server, the address of Neti inside it (default
10.9.0.0/24, server10.9.0.1). - Server public key
- The public key of the hub. Clients use it to recognize the hub; it is not secret. It is useful when you configure a client by hand.
- Routing (forwarding+NAT)
- Pill active or off. It is automatic: it turns on when at least one enabled client uses the mode Company network or Full tunnel, and off when none does. When it is on, the server forwards the packets of the clients towards other networks and hides them behind its own address (NAT). With only Hub only clients it stays off: the server forwards nothing.
- re-apply config
- Rewrites the WireGuard configuration of the server (
/etc/wireguard/wg0.conf) from what the console knows and applies it live. Normally not needed, because every change is applied at once; use it if the tunnel was changed by hand on the server or after an error message such as Client saved but apply failed.
Clients / Peers
The table lists every client of the hub. The line under the table reminds the rule for the status: Handshake < 3 min = client connected. Changes are applied live: active connections are not dropped.
- Name
- The name given when the client was created. The tag external (tooltip config not generated here: it cannot be exported) marks clients that were already in the tunnel when the console first read it (they are named peer followed by their address): Neti does not have their private key, so it can show and disable them but cannot export their configuration.
- Tunnel IP
- The address of the client inside the tunnel. For a backend, this is the address to write as destination of a service.
- Mode
- 📍 Hub only, 🏢 Company network or 🌍 Full tunnel: what the client can reach through the tunnel. See The three modes.
- Handshake
- How long ago the client and the hub last renewed their keys. A connected client renews them about every two minutes. Empty if the client has never connected since the tunnel was last started.
- RX / TX
- Data received from the client and sent to the client, counted by the hub since the tunnel was last started.
- Status
- active (green): the last handshake is less than 3 minutes old, the client is connected. inactive (red): the client is enabled but there has been no handshake for 3 minutes or more (client off, wrong configuration, or UDP port not reachable). disabled (gray): the client was switched off from the console and the hub refuses it.
- Filtering profile
- The filtering profile of the client, or none. Choosing one from the menu saves at once. The services whose destination is an address of this client inherit this profile when they do not have one of their own; a service without either uses the default profile. See Filtering.
- ⬇ export
- Starts the export of the client configuration (tooltip requires an emailed code). Not shown for external clients. See Exporting the configuration.
- disable / enable
- Switches the client off or on again without deleting it. A disabled client is removed from the running tunnel at once and can no longer connect; its address, keys and configuration are kept, so enable brings it back without a new export.
- delete
- After a confirmation (Delete the client …?) removes the client from the console and from the tunnel. Its configuration stops working for good and its address becomes free. If a service uses that address as destination, change the destination first: the backend would no longer be reachable.
➕ Add client (the Add WireGuard client dialog)
The button ➕ Add client at the top right opens the dialog Add WireGuard client. The keys are generated for you: there is nothing to prepare on the client.
- Name
- Required. A name you will recognize, for example the name of the backend. At most 60 characters, without
quotes, apostrophes,
<,>or backslashes. - What it can reach
- The mode of the client: 📍 Hub only (default), 🏢 Company network or 🌍 Full tunnel. See The three modes. For a backend that only has to be reached by Neti, keep Hub only.
- Company subnets (CIDR, comma-separated)
- Shown only with Company network. The networks, besides the tunnel, that the client must reach through
the hub, for example
10.4.6.0/24. Each one must be written as network/prefix. - Tunnel IP
- Pre-filled with the first free address (suggested free address; you can change it). It must be an IPv4 address inside the tunnel subnet and not used by another client or by the server. Leave it empty to take the first free one.
- Client DNS (opt.)
- One or more IP addresses of DNS servers, separated by commas, that the client will use while the tunnel is up. Optional. Leave it empty for a backend: setting it changes the name resolution of the whole machine. It is useful for laptops and phones in Full tunnel mode.
- Preshared key (extra security)
- Adds a second secret, shared between this client and the hub, on top of the key pair. Optional; the client receives it inside its configuration, so nothing else changes for you.
- Create client
- Creates the client and adds it to the running tunnel without dropping the others. The answer is Client added and tunnel updated. Now export its configuration. Possible refusals: IP … is outside the subnet, IP … is already in use, No free IP in the subnet, Invalid DNS, Invalid extra subnet, or the limit of clients of your license.
- cancel / close ✕
- Close the dialog without creating anything.
The free edition allows up to 3 WireGuard clients (clients marked external are not counted); see License.
The three modes
The mode decides which destinations the client sends into the tunnel (the AllowedIPs line of
its configuration). It does not change what Neti can do: Neti always reaches the client at its tunnel address.
- 📍 Hub only
- The client sends into the tunnel only the traffic for the tunnel network. This is the mode for a backend: it answers Neti through the tunnel and everything else keeps using its normal connection.
- 🏢 Company network
- Besides the tunnel network, the client sends into the tunnel the traffic for the subnets you list. The Neti server forwards it with its own address (NAT), so those subnets must be reachable from the Neti server itself. Networks that sit behind another WireGuard client are not routed by the hub.
- 🌍 Full tunnel
- The client sends all its IPv4 traffic (
0.0.0.0/0) through the Neti server, which forwards it to the Internet with its own address. Useful for a laptop or a phone on an untrusted network. Do not use it on a backend: all its outgoing traffic would pass through Neti.
Forwarding and NAT are turned on automatically, and only while at least one enabled client uses Company network or Full tunnel.
Exporting the configuration
The configuration of a client contains its private key, so the console asks for a second confirmation before showing it and shows it only for a short time.
- Press ⬇ export in the row of the client. Neti sends a verification code by email to the address of the user who is signed in (Verification code sent by email: enter it to download the config).
- The box Download configuration, name appears. Type the code and press verify and continue. A wrong or expired code gives Wrong or expired code; press ⬇ export again to receive a new one.
- The box Configuration, name appears with the tunnel address of the client, a QR code and two buttons.
- QR code
- For phones and tablets: in the WireGuard app choose + → Scan from QR code. If the server cannot draw it, the box says QR not available: use the file.
- ⬇ Download .conf
- Downloads the configuration as a text file named
wg-name.conf(characters of the name that are not letters, digits,_or-become_). - done
- Closes the box at once. Press it after the import, so the key does not stay on screen.
The QR code and the download stay available for about 2 minutes after the code was verified; then the box disappears and the download answers Download session expired: request the code again. Do not share the QR code or the file and do not take screenshots of them: whoever has them can connect as that client. The configuration can be exported again at any time with a new code, and every export is recorded in Activity.
What the configuration contains
A standard WireGuard configuration, ready to use:
[Interface] PrivateKey = (the private key of the client) Address = 10.9.0.5/24 DNS = 10.0.0.53 (only if a client DNS was set) [Peer] PublicKey = (the public key of the hub) PresharedKey = (only if requested) Endpoint = 203.0.113.10:51820 AllowedIPs = 10.9.0.0/24 PersistentKeepalive = 25
Address: the tunnel IP of the client with the prefix of the tunnel subnet.Endpoint: the public endpoint and port of the hub.AllowedIPs: the tunnel subnet (Hub only), the tunnel subnet plus the company subnets (Company network) or0.0.0.0/0(Full tunnel).PersistentKeepalive = 25: the client sends a small packet every 25 seconds, so the tunnel stays open also behind NAT and firewalls and Neti can always reach the backend. Thanks to this it is the client that opens the tunnel towards Neti, and no port has to be opened on the client side.
Hub settings
The last box, visible with the permission manage.network.
- Public endpoint
- The public name or IP address of the hub written in the client configurations (without port). Change it if the public address of the server changes or if you prefer a host name. Clients already configured keep the old value until you export their configuration again. Leaving the field empty keeps the current value.
- Tunnel subnet
- The network of the tunnel, as address/prefix (for example
10.9.0.0/24). The change is refused if an existing client would be outside the new subnet (the client … is outside the new subnet). If the server IP falls outside the new subnet, it becomes the first address of the new network. - Port
- The UDP port of the hub (1–65535). When you change it, Neti opens the new port in the firewall of the server and closes the old one. Remember any firewall of the hosting provider in front of the server.
- Save settings
- Saves and applies live (Hub settings saved and applied).
⚠️ Changing the subnet or the port may require exporting the configurations to the clients again: a client with the old port can no longer reach the hub, and stays disconnected until its configuration is updated.
- ↻ Regenerate server key
- After a confirmation, creates a new key pair for the hub. All clients stop connecting until each one receives a new configuration (export them again): the old ones contain the old public key. Use it only if you suspect that the private key of the server was copied.
- ⌫ Reset hub
- After a confirmation (RESET the hub? This removes the tunnel, the keys and ALL clients. It cannot be undone.) stops the tunnel, removes its configuration and keys from the server, turns forwarding off, closes the UDP port in the firewall and deletes all clients and hub settings from the console. The page goes back to Initialize the WireGuard hub. Every service whose destination is a tunnel address stops reaching its backend.
How to connect a backend
- In Network & Tunnels press ➕ Add client, give it a recognizable name, keep 📍 Hub only and press Create client. Neti assigns it an address in the tunnel and prepares its configuration.
- Press ⬇ export, enter the emailed code and download the
.conffile. - On the backend install WireGuard, put the file in
/etc/wireguard/and bring the tunnel up withwg-quick upfollowed by the name of the file without.conf(the name of the file becomes the name of the network interface, so keep it short). To start it at every boot on a Linux system with systemd:systemctl enable wg-quick@name. It is the backend that opens the tunnel towards Neti, with keepalive: no port has to be opened on the backend. - Back in Network & Tunnels, check that the client shows active.
After a restart of Neti the tunnel reconnects by itself. Neti remembers where each client last connected from (it notes it every 5 minutes and at shutdown) and calls it back as soon as it starts, so the services are reachable again within a few seconds instead of waiting for the client to show up (up to a couple of minutes). If the client changed address in the meantime, it reconnects by itself as always.
How to use the tunnel in a service
In the card of the service in Routing, under Destination, write the address of the backend in the tunnel (the field suggests the WireGuard clients), choose scheme and port and save. The change takes effect at once.
For a web server that hosts several sites on the same IP (virtual hosts), the scheme https towards
port 443 is the simplest: Neti sends the name of the site, the server picks the right site and the redirects from
HTTP to HTTPS are not triggered.
Advantages and things to know
In favor:
- Invisible backend: no open port on the Internet and no public IP to protect; the backend opens the tunnel towards Neti, so it also works behind NAT or firewalls that block incoming connections.
- Encrypted traffic between Neti and the backend too, even when the application speaks plain HTTP.
- A single point of access: gate, filtering, bans and logs all go through Neti.
- Low cost: WireGuard adds a few bytes per packet and works in the kernel. With persistent connections towards the backend (see Routing) the connection inside the tunnel is not reopened at every request, and the added latency is just that of the network between the two servers.
Things to know:
- Neti becomes the mandatory passage: if the Neti server is down, the services behind the tunnel cannot be reached from outside. Keep it up to date and with backups enabled.
- The backend sees the tunnel address of Neti, not the address of the visitor: the real IP
arrives in the headers
X-Real-IPandX-Forwarded-For. An application that restricts or records access by IP must be configured to read them, trusting only the address of Neti. - Speed: the limit is the slowest connection between Neti and the backend (for example the upload of an office line). Heavy pages and large downloads suffer more than the normal pages of a business application.
- Large packets: the tunnel slightly reduces the maximum packet size. Usually nobody notices; if some pages or uploads hang while the rest works, check that no device on the path between backend and Neti drops fragmented packets.
- Windows authentication: applications that identify the user with NTLM or Kerberos have precise limits when they pass through a reverse proxy, tunnel or not. See Windows authentication.
Windows authentication (NTLM and Kerberos)
Some Microsoft applications (IIS with "Windows Authentication", Exchange, SharePoint, some intranets) do not ask for the password in a page: the browser proves who the user is with NTLM or Kerberos. Neti publishes them like any other site, but this way of authenticating fits a reverse proxy badly.
Why it is a problem
- NTLM is valid for the connection, not for the request. The recognition takes three steps on the
same TCP connection, and from then on the server considers the connection authenticated. Neti, however,
does not tie one connection of the visitor to one connection towards the backend:
- with persistent connections off, every request reaches the backend on a new connection, the three steps never complete and the browser asks for the password forever;
- with persistent connections on, the connections towards the backend are shared among visitors: a request of one user can travel on a connection already authenticated as another user. This is a security risk, not just a malfunction.
- Kerberos can travel request by request, but the way IIS is usually set up ties it to the connection as well. In addition, the computer of the user must obtain a ticket from the domain controller: from the Internet, outside the company network, it usually cannot, and the browser falls back to NTLM, with the problems above.
- Double sign-in: with the gate on, the user identifies first with Neti (code by email) and then with Windows. Neti does not pass its own identity to the application.
What to do
- Best of all: make the application use sign-in with a login page and a cookie (for example the forms-based authentication of Outlook on the web, or sign-in through an identity provider). It works with the gate, with persistent connections on and from any network.
- If Kerberos is needed, only for users who can reach the domain controller (in the office or
over a VPN):
- on the IIS site leave only Negotiate/Kerberos enabled, remove NTLM;
- set
authPersistNonNTLMtofalse, so that every request carries its own ticket and no connection stays "of one user"; - register the SPN
HTTP/with the public name of the service on the account that runs the site, and add that name to the sites trusted for integrated authentication in the users' browsers; - keep the persistent connections of that service off until you have verified all of the above, and test it with at least two different users at the same time.
- If the application accepts NTLM only: do not publish it as a service. The alternatives:
- Remote access of Neti, with the type Web panel (HTTPS) or Other TCP service on the HTTPS port of the server: Neti forwards the connection as it is, one connection of the visitor for one connection towards the server, and NTLM works. It is meant for administrators: it opens for one person at a time, only from their IP address, after a code by email and for 1–12 hours, on a port of the group 49220–49299, and the browser sees the certificate of the Windows server instead of the one of Neti;
- for many users, a VPN that takes them directly into the network of the server, with no reverse proxy in between.
Pages that also offer sign-in with a login page and a cookie (for example Outlook on the web in forms mode) work like any other site; the problem concerns only the pages where the browser shows the Windows sign-in window.
Hiding the backend
When all the sites of the backend go through Neti, you can close its web ports to the public and leave them open only on the tunnel interface. Before doing it:
- check that every site of the backend is a service of Neti with the DNS pointing to Neti: the others would stop working;
- remove the public DNS records that still point to the IP of the backend, including those with the name of the server;
- remember that an IP that was already published stays in the historical DNS archives: to hide it completely you need a new IP;
- if the backend renews its own certificates over HTTP, with port 80 closed the renewal fails (with the scheme
httpsthis has no effect for the visitors, who see the certificate of Neti).
Troubleshooting
- A client stays inactive and Handshake is empty
- The client never reached the hub. Check, in order: that WireGuard is running on the client with the exported configuration; that the Endpoint (for clients) shown in the hub box is the real public address of Neti; that the UDP port of the hub is open in any firewall of the hosting provider in front of Neti; that the network of the client allows outgoing UDP towards that port.
- A client was active and is now inactive
- The client is off, lost its Internet connection, or still has an old configuration after a change of port, subnet or server key. Export the configuration again and install it on the client.
- The client is active but the service answers with a gateway error
- The tunnel works; the problem is between Neti and the application. Check that the destination of the service is the tunnel IP of the client with the right scheme and port, and that the application listens on the tunnel interface (or on all interfaces) and a local firewall on the backend does not block it. The traffic log of the service in Logs shows the answer of the backend.
- Client saved but apply failed
- The client was stored but the running tunnel was not updated. Press re-apply config in the hub box.
- Config not exportable for this peer / no ⬇ export button
- The client is external: it was not created from the console, so Neti does not have its private key. Delete it and create a new client if you need a configuration generated by Neti.
- The code by email does not arrive
- The export code uses the same mail settings as the sign-in codes: check Settings → Email (SMTP).
- The page shows Initialize the WireGuard hub on a server that had a tunnel
- WireGuard is not available on the server or the hub was reset. The state of the WireGuard service is in Server and its log in Logs → System.
Good to know
- Changes are applied live: adding, disabling or deleting a client does not drop the connections of the others.
- The private key of the server never leaves the server and is not shown in the console.
- The private keys of the clients created from the console are kept by Neti so that the configuration can be exported again; this is why every export requires a code by email and is recorded in Activity.
- The WireGuard rules of the firewall (the UDP port of the hub and the tunnel interface) always stay open: see Firewall.
- The tunnel addresses of the clients are proposed wherever the console asks for an internal address: the destination of a service, the hosts of Remote access and the Probes.