Wireguard failed to set DNS configuration

Hi, I’m trying to set up ProtonVPN via Wireguard (on EndeavourOS of course). I followed this guide to get the config file, followed by this guide to set up the VPN.

However, when I run the wg-quick command from the terminal, I get an error like “Failed to set DNS configuration: Could not activate remote peer ‘org.freedesktop.resolve1’: activation request failed: unknown unit”. I can’t seem to find an appropriate solution from an internet search so here I am asking for help on this forum. Thanks for reading!

Did you try the full path to your configuration file?

sudo wg-quick up /my/wireguard/conf

I just tried it, and I got the same error.

I just tried their free plan and it works for me after changing the name of the conf file. had to remove the _

▶ sudo wg-quick up /home/justice/ramdisk/wg99_conf-NL-FREE-140076.conf                                                                                            X 11ms
wg-quick: The config file must be a valid interface name, followed by .conf

░▒▓    ~/ramdisk   05:59  󰌋 
▶ mv wg99_conf-NL-FREE-140076.conf wg99.conf                                                                                                                      X 12ms

░▒▓    ~/ramdisk   06:01  󰌋 
▶ sudo wg-quick up /home/justice/ramdisk/wg99.conf                                                                                                                 0 1ms
Warning: `/home/justice/ramdisk/wg99.conf' is world accessible
[#] ip link add wg99 type wireguard
[#] wg setconf wg99 /dev/fd/63
[#] ip -4 address add 10.2.0.2/32 dev wg99
[#] ip link set mtu 1420 up dev wg99
[#] resolvconf -a wg99 -m 0 -x
[#] wg set wg99 fwmark 51820
[#] ip -4 route add 0.0.0.0/0 dev wg99 table 51820
[#] ip -4 rule add not fwmark 51820 table 51820
[#] ip -4 rule add table main suppress_prefixlength 0
[#] sysctl -q net.ipv4.conf.all.src_valid_mark=1
[#] nft -f /dev/fd/63

░▒▓    ~/ramdisk   06:01  󰌋 

You do have wireguard-tools installed right?

I have done both things, as it was outlined in the guide. Looking closer, it seems the error comes up when the ‘wg-quick’ command tries to use the resolvconf command. However, I don’t know enough about linux networking to know how to probe further and solve this. If it helps, this is a fresh install of EndeavourOS (installed earlier today) so everything as far as network settings go should be stock.

What is the output of cat /etc/resolv.conf

[(hostmachine)~]$ cat /etc/resolv.conf
Generated by NetworkManager
search home
nameserver [IP of my router]

Now I think about it, you probably have a firewall?

Yeah there is, it seems it was installed by default when I installed the distro. Should I be doing something with it?

Let’s try this command. It will open the port wireguard uses but not permanently. I’m guessing it’s firewalld

sudo firewall-cmd --zone=public --add-port=51820/tcp --add-port=51820/udp

Unfortunately this command did not change the outcome.

I guess you’ll have to wait until someone with actual knowledge about the subject comes online so he can help you out.

Turns out some service wasn’t enabled for some reason.

I ran a command at this link: Github

Thanks for the effort though!

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.