25 lines
1 KiB
SYSTEMD
25 lines
1 KiB
SYSTEMD
|
|
# /etc/systemd/system/garage-firewall.service (rpi)
|
||
|
|
#
|
||
|
|
# Host unit, installed by hand (not Flux-managed) — the file lives in git at
|
||
|
|
# infrastructure/garage/host/. Same shape as k8s-api-firewall.service and
|
||
|
|
# internal-gw-firewall.service on siriussec.
|
||
|
|
#
|
||
|
|
# Ordering note: no Requires= on wg-quick@wg0. The Pi's wg0 is normally brought
|
||
|
|
# up by hand / by wgportal and the template unit can be inactive; a hard
|
||
|
|
# dependency would make this unit fail outright and silently leave Garage
|
||
|
|
# unguarded. Ordering against docker is deliberately absent: this table sits at
|
||
|
|
# PREROUTING priority -140 so it is evaluated before Docker's DNAT (-100)
|
||
|
|
# regardless of which of the two loaded first — and `After=docker.service`
|
||
|
|
# together with a `Before=` on the same unit would be an ordering cycle.
|
||
|
|
[Unit]
|
||
|
|
Description=Drop off-WireGuard inbound to Garage (3900-3903) before Docker DNAT
|
||
|
|
After=network-online.target
|
||
|
|
Wants=network-online.target
|
||
|
|
|
||
|
|
[Service]
|
||
|
|
Type=oneshot
|
||
|
|
ExecStart=/usr/sbin/nft -f /etc/nftables.d/garage_guard.nft
|
||
|
|
RemainAfterExit=yes
|
||
|
|
|
||
|
|
[Install]
|
||
|
|
WantedBy=multi-user.target
|