goatrope

Tie distant machines to one link, or tap the link they share.

goatrope takes a copy of one network link, from a tap device, a switch mirror port or its own inline tap on a small computer, and records it, sends on what you name, or relays named datagrams. The relay joins distant sites over the mesh they already share, or through a declared boundary point when a site stands outside it; it is work in progress. One file declares what it does. It runs with nothing else of ours installed.

Controller site192.0.2.0/24controller192.0.2.10Sensor site 1198.51.100.0/24goatrope198.51.100.200is the controllersensor 1198.51.100.10External site 2198.51.100.0/24goatrope198.51.100.200is the controllersensor 2198.51.100.10boundarypointthe existing mesh between sitesa dedicated tunnel,one peer: the boundary pointonly the declared addresses,ports and directions crossController site192.0.2.0/24controller192.0.2.10the existingmeshboundary pointdedicated tunnelgoatrope198.51.100.200is the controllersensor 1198.51.100.10Sensor site 1198.51.100.0/24goatrope198.51.100.200is the controllersensor 2198.51.100.10External site 2198.51.100.0/24
Joining distant sites: work in progress. A controller at one site reaching sensors at others. Where the sites already share an encrypted mesh, goatrope uses it and adds no tunnel. A site that must stay outside, for technical or policy reasons, is reached through a tunnel of goatrope's own whose one peer is the declared boundary point. Addresses are documentation addresses.
500 of 500datagrams each way through the inline taptests/netns, inline
0frames out of a listen port: install, traffic, attempts to send, restartstests/netns, listen
400 of 400pings through the bridge while it is deployed againtests/netns, deploy
1statically linked binary per machine, no interpreter or library neededci.yml checks every build

Where the copy comes from

goatrope does not have to sit in the link. It listens to whatever hands it a copy; the inline tap is one choice of four.

A tap device

A passive copper tap or a powered tap device in the cable hands goatrope one copy per direction. The link carries on while goatrope is off.

Built. Tested in network namespaces; no device measured yet.

A mirror port

The switch copies a port's traffic to the port goatrope listens on: SPAN on the same switch, RSPAN from another.

Built. Tested in network namespaces.

ERSPAN

The switch sends the mirror over IP, in GRE, to an address on the goatrope machine, which needs no port on the link.

Built. Tested in network namespaces.

Its own inline tap

A small computer with two Ethernet ports, such as a Raspberry Pi, bridges the link and records it. The link is down while it is off.

Built. Tested in network namespaces.

Three roles on one link

Each role is off unless the file declares it.

ABtapcopygoatrope

Tap

Records the link to a bounded ring of capture files, inline or from a copy.

Built. Tested in network namespaces on Ubuntu 24.04 and 26.04.

the copymatchreassembleconvertUDPTCPHTTPfile

Decode and send

Takes the tap's copy, keeps the datagrams you name, and delivers them. It never sends on the tapped link.

Built. Tested the same way.

remoteWireGuardgoatropetargetdroppedone rule: one address, one port, one way in

Relay

Lets one remote machine exchange named datagrams with named machines on the link.

Work in progress. Runs only while someone runs it.

What happens when the machine goes dark

A computer that bridges two ports is in the link, and no software changes that. The declaration has to say which mode you chose. There is no default.

Listen fails open

ABtapgoatroperecordingABtapgoatropeoff

A tap device or a switch mirror port hands goatrope a copy. It receives and does not send.

The link carries on. Only the recording has a gap.

Inline fails closed

ABgoatropebridgingevery frame passes throughthe machineABgoatropeoffevery frame passes througha machine that is not there

Every frame passes through the machine's bridge.

The link is down until the machine is back. A hardware watchdog restarts a hung one.

When the system seems locked down

A system that sends its data only to its own display looks closed. There are still three ways to get a copy without taking control of it, and a fourth when nobody can change anything.

1. One more destination

What it takes
The owner adds one destination to the output the system already sends.
Who acts
The system's owner or vendor.
What changes
One configuration entry.
Undone by
Removing the entry.

2. A mirror port

What it takes
The switch the data crosses copies that port: SPAN, RSPAN or ERSPAN.
Who acts
The site network administrator.
What changes
Nothing on the system; one mirror session on the switch.
Undone by
Deleting the session.

goatrope listens on the mirror port.

3. A listen-only client

What it takes
One more client of the system that only receives, as its displays do.
Who acts
Us, with the system's interface description.
What changes
Nothing in its configuration; one more client.
Undone by
Stopping the client.

4. A cable tap

What it takes
A tap device in the cable the data crosses, or goatrope inline.
Who acts
Us, with the owner's agreement.
What changes
No configuration; the cable is re-made through the tap.
Undone by
Removing the tap.

goatrope listens behind the tap, or is the tap.

Risks and how to choose: three-ways.md.

Install in one command

Write the declaration, then run the install. It refuses, changing nothing, when a port carries your session, the default route or an address. Release 0.2.0 is one archive for arm64 and amd64.

/etc/goatrope/goatrope.toml
schema = 1 [tap]mode = "listen"source = "mirror-port"ports = ["enxPORTA"]management = "eth0" [tap.record]ports = ["enxPORTA"]filter = ""        # every framefile_mb = 50files = 40
On the machine
sudo ./bin/goatrope install --config /etc/goatrope/goatrope.toml
  1. Ubuntu Server 24.04 or 26.04, reached over a third interface. sudo apt-get install -y tcpdump ethtool
  2. Download release 0.2.0, check its signature with the cosign command in release.yml and its contents with sha256sum -c SHA256SUMS, unpack it, and change into its directory.
  3. Fill in the declaration from an example.
  4. Cable the link, then run the command above.
  5. sudo goatrope check exits 0 when the machine matches the file, and 3 when anything differs.
  6. sudo goatrope uninstall puts the ports back as it found them.

Every step: the install card.

Hardware

ComputerRaspberry Pi 4 or 5, or a small amd64 computer. Not yet run on a Pi: tested in containers, in amd64 virtual machines and in an emulated arm64 one
Tap portsbehind a tap device: one or two receive-only ports; on a mirror port: one; inline: two wired Ethernet ports, USB adapters included
Managementa third interface: Wi-Fi or Ethernet
Storageroom for the ring you declare; install refuses one that does not fit

hardware.md has the tap devices and their limits.

Safety properties

  • Default deny. The relay carries only what a rule names, and refuses to run while the kernel would route around it.
  • No egress from a listen port. The drop is in place before the port goes up, and check reads it.
  • A refusal changes nothing. Tests compare the files and ports before and after each one.
  • Pinned components. A decoder or converter is hashed and copied in one read, and the copy is what runs.
  • Signed releases. Each release is the archive, its checksums and a keyless signature made by the release workflow at the tag. 0.1.0 was the first; 0.2.0 is the current one.
  • A limit. A process with CAP_NET_RAW can get past the listen drop. Where sending must be impossible, use a tap that cannot transmit. Known limits