How to Use a NethServer Leader Node as a Gateway to Access Applications on Private Worker Nodes?

I am using NethServer 8 (NS8) to deploy a cluster with two nodes:

  1. Leader Node (Node 1): Deployed on a VPS with a public IP address.
  2. Worker Node (Node 2): Located on a private local network behind NAT.

I have configured a DNS record that points to the public IP of the leader node. Applications hosted on the leader node are accessible from the internet as expected. However, I want the leader node to act as a gateway to route traffic from the internet to applications hosted on the worker node in the private network.

Currently, applications on the worker node are not accessible via the DNS or the leader node. I need guidance on how to:

  • Configure the leader node to route traffic to the worker node.
  • Ensure that applications on the worker node are accessible through the same DNS.

Any advice or best practices on setting up this configuration would be greatly appreciated. Thank you!

Hi,

welcome to NethServer Community!

You could create HTTP routes on the Leader Node to the worker nodes Wireguard VPN IPs.

I tested it with the webserver app on a 3 node cluster, 1 worker node at home.

On the leader node I set following http route:

The Host has to match the app hostname on the worker.

You’ll find the wireguard VPN IPs on the Nodes details pages. On CLI you could use:

ip a s dev wg0

2 Likes