enFlowMeshExit nodes

Exit nodes

An exit node lets a device reach the internet through another device in the mesh network. This is a different setting from subnet routes, which are used to reach specific LAN subnets.

Before you begin

Have a Linux server that has already joined the mesh network and can reach the internet normally, to act as the exit. An admin needs to approve it to provide exit routes and configure the corresponding access permissions for the people using it.

The steps below distinguish two devices: the server providing the exit and the client using the exit. Don’t run both sets of commands on the same device.

1. Provide an exit on the server

On the exit server, enable forwarding, then advertise the exit capability:

sudo sysctl -w net.ipv4.ip_forward=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo flowmesh set --advertise-exit-node=true

Kernel forwarding settings need to be made persistent the way your distribution does it; check again after rebooting. An admin then approves the default routes 0.0.0.0/0 and ::/0 advertised by the node.

For an OpenWrt exit, turn on 作为出口节点 (Use as exit node) in LuCI, then have an admin approve it.

2. Select an exit on the client

List the available exits:

flowmesh exit-node list

Replace office-exit below with the name or mesh IP of a node that actually exists in the list and is available:

sudo flowmesh set --exit-node=office-exit

Automatic exit selection with auto:any is not currently supported.

3. Verify the result

Run flowmesh exit-node list again and confirm the target node shows as selected. Check ExitNodeStatus in flowmesh status --json, and visit an actual business website to verify connectivity; to confirm the public source address, use a public IP lookup service you trust.

Once an exit is selected, internet traffic goes through that node, and DNS forwarding also uses the exit node’s DNS proxy. You can check the DNS state with flowmesh dns status.

Also reach the local LAN

If you need to keep reaching printers or NAS on the client’s local network directly while using an exit:

sudo flowmesh set --exit-node-allow-lan-access=true

This option does not open up the LAN the exit server is on. To reach the private network behind the exit server, configure subnet routes separately.

When the exit is offline

The client doesn’t automatically bypass the selected exit to reach the internet directly; the affected traffic is dropped. If you can’t get online after switching exits, check that the exit is online, approved and has internet connectivity.

To stop using an exit:

sudo flowmesh set --exit-node=

After that, the device reaches the internet through its normal local routes again. To stop providing an exit, run sudo flowmesh set --advertise-exit-node=false on the exit server and check the status in the console.