Skip to content
Discussion options

You must be logged in to vote

problem turned out to actually be the VPN clobbering DNS.

DNS — let the container follow the host's resolver. PIA rewrites
/etc/resolv.conf in place (same inode), so a bind-mount tracks it live: the host's
resolver when the VPN is down, PIA's when it's up, both permitted.

services:
  beszel-agent:
    volumes:
      - /etc/resolv.conf:/etc/resolv.conf:ro

Detection lag — force a redial on each tunnel transition. systemd already tracks the
interface as a device unit, so this needs no polling loop. Adjust wgpia0 to match your
VPN's interface (tun0 for OpenVPN).

# /etc/systemd/system/vpn-redial.service
[Unit]
Description=Redial beszel-agent when the VPN tunnel appears or disappears
BindsTo=sy…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Offbeatmammal
Comment options

Answer selected by svenvg93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants