This was two half-tools with a seam between them, and the seam produced wrong
instructions in practice: install.sh set up the allowlist, while the firewall,
the resolver config, the job network and the runner examples lived in dejima's
ci/ directory to be copied onto a CI box by hand. An operator who installed
this and stopped had a working resolver and no packet filter - which is not a
state that announces itself, since DNS still refuses unlisted names on the
resolver's own account while every job has unrestricted egress.
Nothing should require cloning dejima onto a machine whose purpose is running
untrusted code. So this now owns all of it.
install.sh creates the Docker network with a fixed bridge name, writes the
resolver's static config, installs dejima-ci-allowlist and dejima-ci-firewall,
installs and enables both systemd units, and renders the first allowlist. It
checks for ipset, iptables, ip6tables, dnsmasq and docker up front and says
what their absence costs, because the firewall's first command creates the
ipset and without it the script aborts at line one.
dejima-ci-firewall reads /etc/dejima-ci/config rather than carrying an edited
BRIDGE - the same file the allowlist tool reads, so the job network is
described once. It refuses when the config is missing or unreadable, and when
the bridge does not exist, which at boot means the network was never created
rather than anything transient.
The firewall unit is PartOf and WantedBy docker.service, so the rules are
reapplied whenever Docker starts. Docker recreates its own chains on every
start and DOCKER-USER comes back empty, so "apply them once" was never an
instruction that stayed true.
The resolver's static config is generated rather than copied, from the gateway
and forge host already being prompted for. Its generated half - the server=
lines - stays a separate file, so a hand-edit cannot drift from the list
actually derived from origin/main.
The README absorbs dejima's CI setup guide, walkthrough and reference both.
dejima keeps the threat model and links here.