WireGuard DNS via resolvectl statt DNS= Direktive
wg-quick DNS= setzt catch-all (~.) ueber resolvconf, was systemd-resolved Stub-Resolver blockiert. Flatpak-Apps (Brave, PrusaSlicer) koennen 127.0.0.53 nicht erreichen und haben kein DNS. Fix: PostUp/PostDown mit resolvectl fuer korrektes Interface-basiertes DNS. resolv.conf zeigt auf stub-resolv.conf. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4a4e08a302
commit
72a177e0e5
3 changed files with 7 additions and 5 deletions
|
|
@ -161,9 +161,9 @@ if [[ -n "$REPO_DIR" && -f "$REPO_DIR/wireguard/m${MODEL}.conf" ]]; then
|
||||||
cp "$REPO_DIR/wireguard/m${MODEL}.conf" /etc/wireguard/wg0.conf
|
cp "$REPO_DIR/wireguard/m${MODEL}.conf" /etc/wireguard/wg0.conf
|
||||||
chmod 600 /etc/wireguard/wg0.conf
|
chmod 600 /etc/wireguard/wg0.conf
|
||||||
systemctl enable wg-quick@wg0 2>/dev/null || true
|
systemctl enable wg-quick@wg0 2>/dev/null || true
|
||||||
# systemd-resolved Stub funktioniert nicht mit WireGuard DNS catch-all (~.)
|
# Stub-Resolver noetig fuer Flatpak-Apps (Brave, PrusaSlicer)
|
||||||
# → resolv.conf direkt auf die upstream-Server zeigen lassen
|
# DNS wird per PostUp/PostDown in der wg-Config via resolvectl gesetzt
|
||||||
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
|
ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
|
||||||
ok "WireGuard m${MODEL}.conf → /etc/wireguard/wg0.conf"
|
ok "WireGuard m${MODEL}.conf → /etc/wireguard/wg0.conf"
|
||||||
else
|
else
|
||||||
warn "WireGuard: keine lokale Config gefunden — manuell einrichten"
|
warn "WireGuard: keine lokale Config gefunden — manuell einrichten"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
PrivateKey = sIxh2D50+9bpWe6O6ezrfybW9Iy6QKcrwr9hmFpuGn0=
|
PrivateKey = sIxh2D50+9bpWe6O6ezrfybW9Iy6QKcrwr9hmFpuGn0=
|
||||||
ListenPort = 51820
|
ListenPort = 51820
|
||||||
Address = 10.13.13.8/24
|
Address = 10.13.13.8/24
|
||||||
DNS = 10.47.11.20,10.47.11.1
|
PostUp = resolvectl dns %i 10.47.11.20 10.47.11.1
|
||||||
|
PostDown = resolvectl revert %i
|
||||||
|
|
||||||
[Peer]
|
[Peer]
|
||||||
PublicKey = 7WrqHPof31gcCYMjLWPoP1EIxPR2896/3KL1pQ3YZGs=
|
PublicKey = 7WrqHPof31gcCYMjLWPoP1EIxPR2896/3KL1pQ3YZGs=
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
PrivateKey = OA5IiSzPglSY8GdobOYMlaOaG+QqNjHIACBRe7MvK04=
|
PrivateKey = OA5IiSzPglSY8GdobOYMlaOaG+QqNjHIACBRe7MvK04=
|
||||||
ListenPort = 51820
|
ListenPort = 51820
|
||||||
Address = 10.13.13.7/24
|
Address = 10.13.13.7/24
|
||||||
DNS = 10.47.11.20,10.47.11.1
|
PostUp = resolvectl dns %i 10.47.11.20 10.47.11.1
|
||||||
|
PostDown = resolvectl revert %i
|
||||||
|
|
||||||
[Peer]
|
[Peer]
|
||||||
PublicKey = J/dD1t3Bo9Zbcvxg6PvGP78kgMlL4s4yYfrUMpcoS2w=
|
PublicKey = J/dD1t3Bo9Zbcvxg6PvGP78kgMlL4s4yYfrUMpcoS2w=
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue