====== Setup ====== * see also https://www.bachmann-lan.de/raspberry-pi-mit-wireguard-als-vpn-server-mit-wireguard/ * lokale Kopie {{:raspberry_pi_mit_wireguard_als_vpn_server_bachmann-lan.de_2020-04-10_21_05_58_.html}} ===== DNS-Refresh für Ubuntu 24 Client ===== To refresh or update the DNS server settings used by a WireGuard client on Ubuntu 24.04, you need to ensure both your WireGuard configuration and your system's DNS resolver are correctly set up. Ubuntu 24.04 uses systemd-resolved by default, which changes how DNS settings are applied compared to older releases. Use systemd-resolved with PostUp (Recommended for Ubuntu 24.04) The DNS = ... line in the config is only processed if the system is set up to use resolvconf or openresolv. On Ubuntu 24.04, systemd-resolved is the default resolver and does not process the DNS = ... line automatically Instead, use a PostUp command in your config to set the DNS server via resolvectl: [Interface] PrivateKey = ... Address = ... # DNS = 10.10.0.2 PostUp = resolvectl dns %i 10.10.0.2 PostUp = resolvectl domain %i ~. PostDown = resolvectl revert %i This tells systemd-resolved to use the specified DNS server for the WireGuard interface when it comes up, and to revert the setting when the interface goes down Restart wireguard to apply settings 4. Verify DNS Settings Check the DNS settings applied to your WireGuard interface: resolvectl status wg0 Look for the DNS Servers line to confirm your changes took effect ==== OrangePi ==== apt install -y linux-headers-current-sunxi qrencode dirmngr apt install -y wireguard-tools