Commit Graph
21 Commits
Author SHA1 Message Date
tbenandClaude Opus 5.5 0d8daab3d0 Apply client changes to the running tunnel without a restart
Saving a client or rule restarted the whole host tunnel (wg-quick down/up)
and re-ran the firewall manager setup, which was slow and briefly dropped
every client on the host.

Client and rule changes now sync peers with `wg syncconf` and re-run the
PostUp script, skipping the firewalld/ufw step. Host creation and edits
still do a full restart.

PostUp now loads the per-host chains with `iptables-restore --noflush`, so
re-running it on a live tunnel swaps the rules atomically instead of
leaving the chains empty between flush and re-add.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-03 08:30:41 +01:00
tben ed4a6f3ec8 Add TLS feature with Caddy 2026-10-21 09:13:59 +01:00
tbenandClaude Opus 5.5 cd707465f4 Harden admin API routes and shell usage
- Require admin auth on interface-local-ip, network-interfaces,
  next-listen-port and public-ip (interface-local-ip and public-ip
  allowed unauthenticated command injection as root)
- Validate interface names and call ip/curl via execFileSync
- Write host/client WireGuard configs with fs instead of shell
  heredocs, validating IPs, AllowedIPs, endpoint and listen port
- Replace rm -rf/cat/mkdir/chmod/test shell calls with fs APIs
- Refuse private media requested through the public media route

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-15 21:09:27 +01:00
tben b6f7eb0c75 Allow wildcard rule access host public IP ports 2026-10-07 11:28:41 +01:00
tben c42f0440ac Iptables generator funciton bugfix followup: allow host network ports 2026-09-28 21:24:44 +01:00
tben dbae73a746 Add firewall rules logic for all hosts 2026-09-27 14:25:27 +01:00
tben 27676c5a3f Fix client access scope 2026-09-20 17:26:11 +01:00
tben aa0a292943 Updates 2026-09-20 17:04:17 +01:00
tben 69111e461e Refactor main host setup 2026-09-20 15:37:57 +01:00
tben 3c1d2b61f6 Update hosts form 2026-09-20 13:48:35 +01:00
tben 8b40a876a1 Add public IP field and Network interface to host form 2026-09-20 12:22:54 +01:00
tben 8ec44ee0a7 Updates 2026-09-20 07:27:29 +01:00
tben d5536b49d9 Updates 2026-09-20 04:14:32 +01:00
tben 90ee3debf0 Initialize client forms 2026-09-17 07:22:20 +01:00
tben e0d105beb9 Major updates 2026-09-14 07:56:13 +01:00
tben 42224c94d3 Refactor wireguard to use a different config dir instead of /etc/wireguard 2026-09-13 13:37:48 +01:00
tben ad94385bcb Improve wg-ui host setup: IP availability checks and current-user install script
- setup-main-host-button: live availability status, grab-next-subnet helper, error/success feedback
- setup-wireguard-host: harden generated shell scripts with set -e
- check-private-ip-address-availability: add user access check, drop manual body validation
- setup-main-host: pass host object with wg_ip_address
- install-wg-ui.sh: run service as the invoking user (root or sudo) instead of a dedicated wgui user, and skip systemd/OpenRC daemon setup when NODE_ENV=development
2026-09-13 11:43:26 +01:00
tben 86eb3a0b05 Add host setup functions and client components 2026-09-13 10:52:30 +01:00
tben e057d21e75 Update setupWireguardHost function to grab clients from database 2026-09-13 07:55:28 +01:00
tben 0ecac621c5 Fix host private key read and peer AllowedIPs in wireguard host setup 2026-09-13 07:26:33 +01:00
tben e7e63bc491 Updates 2026-09-13 06:53:33 +01:00