Pre-founding checker for IDSS: run it on the machine you mean to make a community gateway and learn whether the device and its home internet line qualify — before opening the founding app.
  • Go 98.9%
  • Shell 1.1%
Find a file
jamin c9964a688a docs: test guide for a team member running the checker on a real home line
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 01:01:23 -05:00
cmd/gateway-check CGNAT by the hop path + a router whose UPnP is off its internet link (Ben, 2026-10-06, from the Starlink line) 2026-10-06 23:11:22 -05:00
docs docs: test guide for a team member running the checker on a real home line 2026-10-07 01:01:23 -05:00
internal CGNAT by the hop path + a router whose UPnP is off its internet link (Ben, 2026-10-06, from the Starlink line) 2026-10-06 23:11:22 -05:00
scripts gateway-check: the pre-founding checker, as its own module — moved out of Matou/idss on Ben's word 2026-09-29 22:58:48 -05:00
.gitignore gateway-check: the pre-founding checker, as its own module — moved out of Matou/idss on Ben's word 2026-09-29 22:58:48 -05:00
.golangci.yml gateway-check: the pre-founding checker, as its own module — moved out of Matou/idss on Ben's word 2026-09-29 22:58:48 -05:00
go.mod gateway-check: the pre-founding checker, as its own module — moved out of Matou/idss on Ben's word 2026-09-29 22:58:48 -05:00
README.md CGNAT by the hop path + a router whose UPnP is off its internet link (Ben, 2026-10-06, from the Starlink line) 2026-10-06 23:11:22 -05:00

gateway-check

Run this on the machine you mean to make a community's gateway, on the internet line it will live on, before you open the IDSS founding app. It tells you in one screen whether the device and the connection can do the job, and if not, exactly which thing falls short and what fixes it.

$ sudo ./gateway-check
gateway-check — measured on totara, 2026-09-29 14:02 NZST

Device — measured on this machine
  ✓ architecture   x86_64
  ✓ cpu            8 cores (needs 2)
  ✓ memory         14 GB (needs 4 GB)
  ! disk           232 GiB on /, only 18 GiB free (the gateway needs 40 GiB)
                   → Free up space on this disk before founding, or the gateway install will run out of room.
  · virtualisation available — VM mode possible
  ✓ web ports      80 and 443 free

Connection — this machine's line
  ✓ public address 203.0.113.7
  · router         192.168.1.254 reports 203.0.113.7 — matches what the internet sees
  · port opening   UPnP offered — the founding app can ask the router to open the ports
  ✓ reaches Mātou  get.idss.nz, nix.cache.idss.nz, broker.idss.nz
  · download       4.8 MB/s — a first founding (~4 GB) would take about 15 minutes
  · ipv6           none (fine — never required)
  ✓ visitors       from broker.idss.nz, visitors reach this machine on ports 80 and 443 — your port forwarding works

Verdict: READY — this machine and its line can be the gateway. Open the founding app.

Get it

git clone https://git.matou.nz/Matou/gateway-check.git
cd gateway-check
CGO_ENABLED=0 go build ./cmd/gateway-check
sudo ./gateway-check

Go 1.25 or newer. The binary is static and has no dependencies beyond the standard library. It runs on Linux, which is the only platform a gateway runs on; elsewhere the device checks read as unmeasured.

What it checks

Device (measured on this machine)

check rule
architecture x86_64 or aarch64
cpu 2 cores or more
memory 4 GB or more, measured as the kernel sees it (a real "4 GB" box passes)
disk 40 GiB or more on the disk the gateway would install onto (--disk-path, default /); a warning when less than that is free
virtualisation information only: VM mode needs it, a full install does not
web ports 80 and 443 not already in use on this machine

Connection (this machine's line)

check rule
public address the address the internet sees for this line; a CGNAT or private address fails, because no router setting can fix it. The first hops out are traced too (tracepath): a hop in 100.64.0.0/10 beyond your LAN is a carrier-grade NAT, so a public-looking address behind one fails the same way — the Starlink standard-plan case, where the home router cannot tell you either
router what your router says its own public address is (read-only UPnP / NAT-PMP); a mismatch with the address above warns of a second NAT upstream
port opening whether the router offers UPnP or NAT-PMP (a router whose UPnP reports its internet link as Disconnected is not a path — it isn't the router holding the connection) — and, with your consent, the tool asks it to forward 80 and 443 to this machine (UPnP first, NAT-PMP as the fallback), then proves the forward with the visitors check. Proven → the forward is kept (this machine is about to be the gateway). Not proven → it is removed again. Refused by the router → expect the manual port-forward walkthrough
reaches Mātou the release feed, the binary cache and the broker answer — the gateway downloads its own software from them
download a 20 s sample of a real release artifact, projected onto a first founding's ~4 GB; warns below 1 MB/s
ipv6 information only, never required
visitors the Mātou broker knocks on this line's ports 80 and 443 from outside; with sudo the tool holds those ports during the knock so a working port forward reads as proven

Every line is a measured fact. A check that cannot be measured says so and is counted as unmeasured, never as a pass or a fail. The one thing the tool writes is the port forward above, and only after asking you (on a terminal) or being told --open-ports; --no-open-ports keeps it strictly read-only.

Flags and exit codes

--disk-path /     the disk the gateway would install onto
--json            emit the report as JSON
--no-speed        skip the download sample
--no-bind         never hold ports 80/443 during the outside-in probe
--timeout 180s    bound for the whole run
--open-ports      ask the router to forward 80/443 here without prompting (consent given here)
--no-open-ports   never write to the router (discovery only)
--keep-ports      keep a granted forward even when the visitors check did not prove it

Off a terminal (a script, a pipe, --json) the tool never writes to the router unless --open-ports is given.

exit meaning
0 READY — nothing failed (warnings allowed)
1 NOT READY — something to fix, named in the verdict line
2 UNPROVEN — nothing failed, but something could not be measured

Known limit

The visitors check depends on the broker observing your line. The broker's front was fixed on 2026-10-06 (IDSS #2010: PROXY protocol between Caddy and the broker, and a refusal to probe a non-public peer); until that build is live the tool honestly reports the visitors check as unmeasured rather than guessing, and a forward it opened is removed again because it could not be proven.