Skip to content

Conversation

@brizzbuzz
Copy link
Owner

Add a managed ProtonVPN WireGuard config and systemd services to bring up
a proton-managed interface, maintain NAT-PMP port forwarding, and set up
routing and nftables rules so qBittorrent traffic uses the VPN.

  • add secret reference for Proton WireGuard config and expose it at
    /etc/wireguard/proton.conf (root:root 0600)
  • enable a proton-wg systemd oneshot to create a cleaned
    /etc/wireguard/proton-managed.conf and bring up the interface
  • add proton-routing service to install ip rules/routes for marked
    traffic (table 51820) for IPv4 and IPv6, and clean them on stop
  • add proton-natpmpc service (skeleton visible in diff) to maintain
    NAT-PMP port forwarding through ProtonVPN
  • mark qBittorrent traffic in nftables (qbittorrent_mark) and enforce
    an outbound killswitch (qbittorrent_killswitch) dropping non-VPN
    traffic for the qbittorrent user
  • create /etc/wireguard directory and set qbittorrent UID/GID to 983
  • adjust qBittorrent connection settings to bind to the managed
    interface and use a fixed port, disable RandomPort and UPnP
  • include proton-wg in systemdIntegration.services so fleet restarts
    will notice changes

These changes ensure torrenting traffic is bound to the ProtonVPN
WireGuard interface, providing a killswitch and proper routing to avoid
leaks if the VPN is down.

Add a managed ProtonVPN WireGuard config and systemd services to bring up
a proton-managed interface, maintain NAT-PMP port forwarding, and set up
routing and nftables rules so qBittorrent traffic uses the VPN.

- add secret reference for Proton WireGuard config and expose it at
  /etc/wireguard/proton.conf (root:root 0600)
- enable a proton-wg systemd oneshot to create a cleaned
  /etc/wireguard/proton-managed.conf and bring up the interface
- add proton-routing service to install ip rules/routes for marked
  traffic (table 51820) for IPv4 and IPv6, and clean them on stop
- add proton-natpmpc service (skeleton visible in diff) to maintain
  NAT-PMP port forwarding through ProtonVPN
- mark qBittorrent traffic in nftables (qbittorrent_mark) and enforce
  an outbound killswitch (qbittorrent_killswitch) dropping non-VPN
  traffic for the qbittorrent user
- create /etc/wireguard directory and set qbittorrent UID/GID to 983
- adjust qBittorrent connection settings to bind to the managed
  interface and use a fixed port, disable RandomPort and UPnP
- include proton-wg in systemdIntegration.services so fleet restarts
  will notice changes

These changes ensure torrenting traffic is bound to the ProtonVPN
WireGuard interface, providing a killswitch and proper routing to avoid
leaks if the VPN is down.
@brizzbuzz brizzbuzz merged commit d4fd265 into main Feb 12, 2026
1 of 3 checks passed
@brizzbuzz brizzbuzz deleted the rb-branch-3 branch February 12, 2026 01:55
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.

1 participant