Skip to content

Defguard client for Ubuntu and MacOS, plus WireGuard fixes and docs cleanup - #5

Merged
Sebastien-Meiffren merged 13 commits into
mainfrom
infra-review-2026-09
Sep 17, 2026
Merged

Sebastien-Meiffren merged 13 commits into
mainfrom
infra-review-2026-09

Conversation

@joelborg

@joelborg joelborg commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Main change: Defguard desktop client (defguard/)

New module that installs the Defguard VPN client, the replacement for the WireGuard setup.

Ubuntu (24.04 and 26.04, amd64 and arm64), last module of ./install.sh --all:

  • Installs the pinned 2.1.0 ubuntu-22-04-lts package from the GitHub release, checked against its sha256; apt pulls the dependencies.
  • Makes sure the user is in the defguard group, defguard-service is running and /var/run/defguard.socket exists; warns if resolvconf is missing.
  • Reboot check. The client reaches the service through a socket restricted to the defguard group, and a logout and login is not always enough for a new group to reach desktop apps. The installer reads the Groups: line of /proc/<pid>/status for the user's systemd manager and the running client, then says whether a reboot is needed, a client restart is enough, or nothing is required. It asks before rebooting, except during --all (DOTFILES_INSTALL_ALL=1), where it only warns.
  • Symptom it prevents: Failed to establish VPN connection right after a valid MFA code.

MacOS (13.5 or later), last module of MACOS_MODULE_ORDER:

  • The Homebrew cask is stuck on 1.5.x and deprecated, so the module installs the release DMG: sha256, code signature, vendor Apple Developer team and Gatekeeper are checked before copying into /Applications.
  • An App Store install, or an equal or newer version, is left alone. The script stops while Defguard is running.

test.sh checks the package, service, socket and group on Ubuntu, and the app, its signing team and the VPN system extension on MacOS. Skipped in Docker; test-macos.sh covers it in CI.

Also in this PR

  • WireGuard dispatcher: the down branch only reacts to the WiFi interface, and PersistentKeepalive = 25 is added to the client config.
  • fix-vpn command (infra-tools-kit): always-on WireGuard for laptops that need the VPN at the office.
  • Docs: infra-tools-kit and certs READMEs, README cleanup (missing files, --all order, manual modules), Ubuntu 26.04 report and verify script moved out of the root, AGENTS.md for coding agents.

Testing

  • Defguard on Ubuntu 24.04 (arm64 and amd64) and 26.04 (arm64) containers: fresh install, idempotent rerun, reboot detection for a stale session, client restart case, checksum mismatch, root refusal, Docker skip.
  • Defguard on MacOS: App Store install detected and left alone; DMG install, upgrade, checksum mismatch and running-app guard exercised; test-macos.sh passes.
  • Still to check on real machines: a full --all on an Ubuntu laptop, and the system extension approval prompt after a DMG install on a Mac.

Open questions

  • Should the WireGuard dispatcher keep skipping the VPN on ITSF-Wifi, now that fix-vpn exists?
  • scripts/verify-install.sh does not check infra-tools-kit or defguard yet.
  • The unmerged kitty-latest-and-claude-code branch uses the same 16th (--all) and 10th (MacOS) slots as defguard.

…e defguard group

Manual, Ubuntu-only module. Installs the Defguard desktop client 2.1.0 from the
pinned ubuntu-22-04-lts GitHub release package, verified against its sha256,
then makes sure the user is in the defguard group and defguard-service runs.

The client reaches the service through a socket restricted to that group. A
logout and login is not always enough on Ubuntu, so the installer reads the
Groups line of /proc/<pid>/status for the user's systemd manager and the running
client, tells whether a reboot is required, and asks before rebooting.

Skipped on MacOS (added to MACOS_SKIP_MODULES) and in Docker.
…--all

defguard becomes the last module of the Ubuntu --all order, so its reboot
warning is the last thing printed. install_all_modules exports
DOTFILES_INSTALL_ALL=1: the module then only warns that a reboot is required
instead of asking, since --all runs without prompts.

The README order list gains defguard.
The Homebrew cask defguard-client is stuck on 1.5.x and deprecated, so the
module installs the universal DMG of the pinned release: sha256 checked, code
signature verified, signed by the vendor's Apple Developer team and accepted by
Gatekeeper, then copied into /Applications with ditto. An App Store install or
an equal or newer version is left alone, and the script stops while Defguard
is running.

defguard joins MACOS_MODULE_ORDER (last) and leaves MACOS_SKIP_MODULES;
test-macos.sh checks its syntax and portable test. On MacOS, test.sh checks the
application, its signing team and whether the VPN system extension is enabled.
…the no-prompt rule

Sixteen modules in the Ubuntu --all order, defguard last; defguard runs its own
installer on MacOS as well. Modules must not prompt when DOTFILES_INSTALL_ALL=1.
The unmerged claude-code branch takes the same 16th and 10th slots.
@joelborg joelborg changed the title WireGuard fixes, fix-vpn command, docs cleanup Defguard client for Ubuntu and MacOS, plus WireGuard fixes and docs cleanup Sep 17, 2026
@Sebastien-Meiffren

Copy link
Copy Markdown
Contributor

all good

@Sebastien-Meiffren
Sebastien-Meiffren merged commit 7cccb54 into main Sep 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants