Skip to content

Connecting to Wireguard DNS is broken since 1.23.0 #390

@davidmayr

Description

@davidmayr

kubefwd version

1.25.9

Kubernetes version

Client Version: v1.34.1 Kustomize Version: v5.7.1 Server Version: v1.34.3+k3s1

Operating System

Windows

Bug Description

My Kubernetes Cluster is behind a Wireguard VPN with a custom DNS configured in the Wireguard config. On Version 1.22.4, everything is working as expected.

After upgrading to any version past that (1.23.0+), I can no longer connect to my cluster. I would assume this project started doing some DNS server gymnastics instead of looking up naming properly like any other software does.

The error message shows the IP of my normal DNS server (that's listed under my normal network interface) (10.251.137.88:53) instead of the WireGuard one, so I think that should confirm my theory.

Tools like kubectl work just fine.

Steps to Reproduce

  • Be on Windows
  • Have Wireguard VPN connected with a custom DNS server configured
  • Try to connect
  • Fail.

Verbose Logs

kubefwd svc -n redacted-dev -v
INFO[14:16:16]  _          _           __             _
INFO[14:16:16] | | ___   _| |__   ___ / _|_      ____| |
INFO[14:16:16] | |/ / | | | '_ \ / _ \ |_\ \ /\ / / _  |
INFO[14:16:16] |   <| |_| | |_) |  __/  _|\ V  V / (_| |
INFO[14:16:16] |_|\_\\__,_|_.__/ \___|_|   \_/\_/ \__,_|
INFO[14:16:16]
INFO[14:16:16] Version 1.25.9
INFO[14:16:16] https://kubefwd.com
INFO[14:16:16]
INFO[14:16:16] Press [Ctrl-C] to stop forwarding.
INFO[14:16:16] 'cat C:\Windows\System32\drivers\etc\hosts' to see all host entries.
INFO[14:16:16] Loaded hosts file C:\Windows\System32\drivers\etc\hosts
INFO[14:16:16] HostFile management: Original hosts backup already exists at C:\Users\david/hosts.original (created 2025-12-11 16:29:54). Use -b to create a fresh backup.
FATA[14:16:17] Error connecting to k8s cluster: Get "https://redacted.redacted.redacted:6443/version": dial tcp: lookup redacted.redacted.redacted on 10.251.137.88:53: no such host

Configuration

None

Checklist

  • I have searched existing issues to ensure this bug hasn't already been reported
  • I am running kubefwd with sudo -E to preserve environment variables

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions