Routing peer installation

A routing peer is a Linux machine with the Netzilo client that forwards traffic between your peers and a network where the client is not installed, such as an office LAN or a cloud VPC. This page prepares that machine. What you route through it is set up afterwards under Network > Routes, see Routes.

Requirements

ItemRequirement
Operating systemLinux with systemd on amd64. Only Linux peers can route.
Size2 vCPU and 4 GB of memory are enough for a small site. For a busy site, plan 4 vCPU, 8 GB of memory and 50 GB of disk.
PlacementInside the network you want to reach, able to connect to the target hosts. It needs no public address.
OutboundTCP 443 to the Netzilo Server (management, signal and relay). UDP to any port for direct peer-to-peer connections; without it, traffic goes through a relay and still works, more slowly.
InboundNothing.
Toolssudo and wget for the installer; nft or iptables.

Step 1: Create a setup key

Go to Endpoint > Setup Keys and click Create Setup Key. For routing peers:

  • Turn on Make this key reusable if you will enroll more than one routing peer with it.
  • Under Auto-assigned groups, add a group for routing peers, for example dc-routers. Routes and policies then refer to that group.
  • Turn on Ephemeral Peers only for routing peers that come and go, such as containers or autoscaling groups. Their peers are removed 10 minutes after they go offline.

Copy the key; it is shown once. See Setup Keys.

Step 2: Install the client

On the Linux machine:

curl -fsSL https://pkg.netzilo.com/download/linux/install_netzilo_linux.sh | sh

The script installs the netzilo binary and starts the Netzilo service.

Step 3: Connect with the setup key

On Netzilo Cloud:

netzilo up --setup-key <SETUP_KEY>

On your own Netzilo Server, add the server's address:

netzilo up --management-url https://netzilo.example.com --setup-key <SETUP_KEY>

The address is stored; later netzilo up calls need no flags.

Step 4: Check the connection

netzilo status -d

The output shows Management: Connected, Signal: Connected and Relays: N/N Available. The machine appears under Endpoint > Peers with the group from the setup key.

Step 5: Allow forwarding on the host

The client turns on IP forwarding and creates its own firewall rules when the machine starts routing. A host firewall that drops forwarded traffic by default must still let traffic pass between the Netzilo interface wt0 and the LAN interface. With ufw, for example:

sudo ufw route allow in on wt0 out on eth0
sudo ufw route allow in on eth0 out on wt0

With firewalld, allow forwarding or masquerading in the zone of the LAN interface. In a cloud, the target hosts' security groups must allow traffic from the routing peer's private address.

Do not edit the firewall chains the client creates (their names start with netzilo or NETZILO). They are rebuilt on every change.

Next steps

  1. Add the route: Network > Routes > Add Route, with the network range or domains, the routing peer or its group (dc-routers), and the distribution groups of the users. See Routes.
  2. Add a policy from the users' group to dc-routers, see Policies.
  3. On a user's device, check with netzilo routes list that the route is listed and selected.

For high availability, enroll a second routing peer with the same setup key.

Upgrade a routing peer

Running the install script again also upgrades, but it runs netzilo down first, which logs the peer out: a peer enrolled with a setup key must then run netzilo up --setup-key again, and a new peer can appear in the list. To upgrade without that, replace the binary and restart the service:

sudo wget -O /usr/bin/netzilo https://pkg.netzilo.com/download/linux/netzilo
sudo chmod +x /usr/bin/netzilo
sudo netzilo service restart

Troubleshooting

Management or Signal is not connected. Outbound TCP 443 to the Netzilo Server is blocked, or the management address is wrong. On your own server, check the address you passed with --management-url.

Connections to the routing peer are relayed. Outbound UDP is blocked. It works, with higher latency. Allow outbound UDP for direct connections.

Users reach the routing peer but not the hosts behind it. Forwarding is blocked on the host or by a security group, see Step 5.

The machine is not offered as routing peer. It is not a Linux peer, or it already routes this network.

  • Routes - Publish a network through the routing peer
  • Exit nodes - Use the routing peer for internet traffic
  • Setup Keys - Enroll servers without a user login
  • Install Netzilo - All platforms and installers
  • CLI - netzilo up, status and routes