RemoHop

中文

Docs

Networking: the mesh (remohop net) and Tailscale

RemoHop has two ways to carry IP traffic, and it gets along with Tailscale:

remohop doctor explains how all of this looks from the machine it runs on.

remohop net

Requirements

The host's config directory is the device: log in, and run remohop net, with the same directory the host uses. For a system service that is sudo env REMOHOP_CONFIG_DIR=/var/lib/remohop remohop ... (as remohop service status prints).

Quick start

On every device:

sudo remohop net up
remohop net status
remohop net peers
ping nas.remohop

remohop net up switches the mesh on in the configuration (remohop config get net); the running host brings it up within two seconds and again at every start. remohop net down takes it down and keeps it down.

Addresses and names

DNS, per operating system

Each device runs a small DNS responder on its own mesh address, port 53, that answers A and AAAA for NAME.remohop and refuses everything else, so it can never stand in for your normal resolver. How the system is pointed at it is the net-dns setting (remohop net up --dns MODE), conservative by default:

ModeLinuxEffect
auto (default)with systemd-resolved: resolvectl dns/domain ~remohop/default-route false on the mesh interfaceonly .remohop goes to the responder; the settings belong to the interface and vanish with it, so nothing can be left behind
autowithout systemd-resolvednothing is changed; remohop net status says so. Point a resolver at MESH-ADDRESS:53 for .remohop yourself, or use hosts
hostsa block between # BEGIN remohop-net and # END remohop-net in /etc/hosts, rewritten as devices come and go, removed by remohop net down (and by the next start after a crash)
offonly the responder

macOS (/etc/resolver/remohop) and Windows (NRPT rules) would be the equivalents of auto; they are not implemented because the mesh does not run there yet.

Access control

Without a policy every device of the mesh may reach every port of every other, like a LAN. A policy restricts that:

{
  "version": 2,
  "rules": [
    {"from": ["laptop", "phone"], "to": ["nas"], "ports": ["22/tcp", "445/tcp", "icmp"]},
    {"from": ["*"], "to": ["printer"], "ports": ["631/tcp"]},
    {"from": ["laptop"], "to": ["192.168.1.0/24"]}
  ]
}
remohop net policy set policy.json
remohop net policy
remohop net policy reset

Subnet routes and exit node (Linux, IPv4)

sudo remohop net up --route 192.168.1.0/24 --exit     # the office machine
sudo remohop net up --accept-routes                   # a device that wants the office LAN
sudo remohop net up --use-exit office                 # a device that sends all traffic via the office
sudo remohop net up --no-exit-node --no-accept-routes # back to plain

Status and service

Using RemoHop with Tailscale

RemoHop and Tailscale can run side by side; neither depends on the other.

Tested in the NAT lab (test/natlab/natlab.sh tailnet) with a fake Tailscale: an interface named tailscale0 with 100.x addresses joining host and client over a deliberately slow link, and stub status files. The session takes the tailnet although the punched path is faster, takes the punched path when the preference is switched off, and connects over the tailnet between two symmetric NATs. Not tested against a real tailscaled.

What remohop net is not

remohop net is deliberately the one-person, own-devices part of what Tailscale offers. Not replicated:

Roadmap (phase 2)

Team features are postponed on purpose, until the single-account mesh has seen real use:

  1. Shared devices and guests across accounts (invitation by fingerprint, verified address claims, policy selectors per account).
  2. Groups and tags in the policy; a policy history and remohop net policy diff.
  3. macOS (utun, /etc/resolver/remohop) and Windows (Wintun, NRPT) data planes.
  4. IPv6 subnet routes and exit traffic; DNS through the exit node.
  5. A team view of devices and links (still without a central server that holds keys).

Security notes

Limits and what was tested

Source file (GitHub)