Shell details endpoint + DHCP ufw fix #24

Open
thelion wants to merge 0 commits from thelion/shell-details into main AGit
Owner

POST /v1/shell-details for managebot's Shell details panel; bootstrap accepts container DHCP before ufw's invalid drop.

POST /v1/shell-details for managebot's Shell details panel; bootstrap accepts container DHCP before ufw's invalid drop.
One read-only call collects what staff want to see about a shell: Incus
state, created/started times and uptime, limits (CPU, allowance, memory,
processes, root size) with current memory, CPU and disk use; the private
IPv4 on incusbr0 (warning when there is none, since Traefik's sites are
then down), the routed IPv6 and both MACs; every Traefik route from
<user>.yml and webhost-<user>-<label>.yml with its backend, a TCP connect
check from the host and a stale flag when the backend isn't the shell's
current IPv4; TCP/UDP listeners from ss with their processes and owners,
public when the routed IPv6 reaches them; the process list with the base
image's services and Podman plumbing marked; each account's Podman
containers (rootful too); and every crontab.

The in-shell part is one script under incus exec -n (stdin from
/dev/null, so it never blocks on or eats ours). Incus has 8 s, the
script 15 s, the request 25 s. Each part fails on its own into errors,
so a stopped shell or a broken Incus still returns the config, routes
and DNS records. The username is in the signed body like every other
call, so a signature can't be replayed for another shell.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(host): accept container DHCP before ufw's invalid-state drop
Some checks failed
CI / release (push) Successful in 3m34s
CI / test (push) Successful in 4m6s
CI / test (pull_request) Successful in 4m25s
CI / release (pull_request) Failing after 1s
c787c0d7b8
With br_netfilter loaded (Docker), a shell's fresh DHCPDISCOVER reaches
INPUT as ct state invalid and ufw-before-input drops it before the
incusbr0 allow rule. Renewals are unicast and pass, so shells only lost
their IPv4 after a restart, and Traefik then served 502 for their sites
(nortal28, 2026-11-29). Already applied by hand on the live host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Some checks failed
CI / release (push) Successful in 3m34s
CI / test (push) Successful in 4m6s
CI / test (pull_request) Successful in 4m25s
CI / release (pull_request) Failing after 1s
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin +refs/pull/24/head:thelion/shell-details
git switch thelion/shell-details

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff thelion/shell-details
git switch thelion/shell-details
git rebase main
git switch main
git merge --ff-only thelion/shell-details
git switch thelion/shell-details
git rebase main
git switch main
git merge --no-ff thelion/shell-details
git switch main
git merge --squash thelion/shell-details
git switch main
git merge --ff-only thelion/shell-details
git switch main
git merge thelion/shell-details
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ircforever/shells-config!24
No description provided.