prefixkit Ask an engineerAsk Support RU

Error reference · WireGuard

WireGuard: Name or service not known: `vpn.example.com:51820'

Name or service not known: `vpn.example.com:51820' / Configuration parsing error

What it means

wg-quick could not resolve the Endpoint host name when bringing the tunnel up.

Why it happens

  • DNS is not available yet at boot (the tunnel starts before the network).
  • A typo in the host name, or the DNS record does not exist.
  • DNS works only through the tunnel that is not up yet.

How to fix it

  1. Check the name: dig vpn.example.com.
  2. Start the tunnel after the network: systemctl enable wg-quick@wg0 with After=network-online.target.
  3. Use the server IP in Endpoint if DNS is unreliable.

Useful tools

DNS lookup · WireGuard config generator

Other WireGuard errors

Idea?