this post was submitted on 21 May 2024
64 points (97.1% liked)

Linux

48220 readers
914 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I have wasted the last 2.5 hours trying to see where I went wrong with my configuration and I just can't.

For the record, I am running OpenSuse Tumbleweed with Gnome, latest update for everything. Up to now I have been using AdGuard as my DNS resolver, but am now trying to switch to Mullvad but at this point I think I probably don't want to anymore. Reason being, I just can not get it to work for the life of me.

My system has NetworkManager installed so I go there, select my connected Wifi, and enter Mullvad's DNS address 194.242.2.4 in thr IPv4 section, then I go to check to see if it shows I am using their DNS and it Firefox AND Vivaldi give no internet connection errors. I go back to Adguard DNS and my internet is back working again. I go back to Mullvad, you guessed it, no internet once again. I even tried Cloudflare and Quad 9's DNS addresses and both of those worked as well but Mullvad's just does not want to work and I am going insane over it.

And no I can not edit resolv.conf through the terminal because NetworkManager will override it and no I don't want to delete NetworkManager. Any feedback would be appreciated.

Edit: I have Mullvad DNS on my phone and got it running with zero issues so this is more of a Linux problem than a Mullvad DNS problem I think.

Solution:

Open terminal and follow through

sudo zypper install systemd-network

sudo nano /etc/systemd/resolved.conf

Copy paste this into the file that you just opened and change the DNS to whichever DNS provider you are using.

[Resolve]

DNS=194.242.2.4 2a07:e340::4

FallbackDNS=194.242.2.2 2a07:e340::2

Domains=~.

DNSSEC=yes

DNSOverTLS=opportunistic

#MulticastDNS=no

#LLMNR=no

#Cache=yes #CacheFromLocalhost=no

#DNSStubListener=no

#DNSStubListenerExtra=

#ReadEtcHosts=yes

#ResolveUnicastSingleLabel=no

Ctrl + O to write out and Ctrl + X to exit back to the terminal main page.

ln -sf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

sudo systemctl start systemd-resolved

sudo systemctl enable systemd-resolved

sudo systemctl restart NetworkManager

Boom it should be working now.

all 36 comments
sorted by: hot top controversial new old
[–] [email protected] 22 points 6 months ago (2 children)

Mullvad (apparenlty, first time I've heard from the service) uses DNS over TLS and I don't think that the current GUI version has the option to enable it. Here's a quickly googled howto from Fedora on how to enable it on your system. If that doesn't help search for 'NetworkManager DOT' or 'DNS over TLS'.

[–] [email protected] 20 points 6 months ago (1 children)
[–] [email protected] 4 points 6 months ago (1 children)

The solution on their page does not work as my network settings are controlled by Network Manager

[–] [email protected] 0 points 6 months ago

I tried the guide you sent, and it gives me an error in the terminal when I try to restart NetworkManager. This is caused by the thing in step 2, and when I remove the file that was created in step 2, NetworkManager starts fine again, but now I need to have a DNS IP address entered into IPv4 and IPv6 per network connection, and it can not be Mullvad's DNS servers otherwise I again get no connection which again just puts me back at square one, only now I have a systemctl command running in the background for no reason.

[–] [email protected] 8 points 5 months ago (1 children)

A bunch of people said resolvd already and I hate to admit it, but this fixed dns over tls for me too.

Mark it as a rare systemd w.

[–] [email protected] -1 points 5 months ago (1 children)

Could you potentially send me the instructions/steps/guide you followed? I attempted to use systemd for this but haven't had much luck.

[–] [email protected] 3 points 5 months ago

It was a while ago and I’m on Debian so my experience might be different but last named version I had to put a line pointing to the internal resolved address in resolv.conf like in this forum thread.

[–] [email protected] 7 points 6 months ago* (last edited 6 months ago) (1 children)

You can edit resolv.conf and

# chattr +i resolv.conf

makes the file immutable.

It's a kludge, and I'm not saying that it solves your DNS issue, but NM can't override the file.

[–] [email protected] 5 points 6 months ago* (last edited 6 months ago) (2 children)

How would I undo this process? I am considering testing this out but how would I make it overridable again just in case?

Edit, just tried it and added the DNSoverTLS=yes line and it did not seem to fix anything so unfortunately this isn't a solution but still a nice thing to know.

[–] [email protected] 11 points 6 months ago (1 children)
[–] [email protected] 5 points 6 months ago

What a surprise.

[–] [email protected] 2 points 6 months ago

Another option is to remove it and symlink it to a static version of your choosing. I believe NM won't replace a symlink. You can just remove the symlink when you're done and it should go back to normal...I think.

[–] [email protected] 6 points 5 months ago (1 children)

I just glimpsed over the other comments, I also use both Mullvad VPN and tumbleweed. I switched to systemd-resolvd and got it working at some point, but its a big hassle and I also had strange problems when trying it for the first time. I could try to look into my configuration on the weekend.

[–] [email protected] -4 points 5 months ago

Please do and give me all the steps you took to get it working. Very appreciated. I tried usinf systemd-resolved but had no luck getting it to work.

[–] [email protected] 4 points 5 months ago

ty i gave up to do this long time ago until i found out your post

[–] [email protected] 3 points 6 months ago

I’ve switched from Quad9 to Mullvad DNS a month ago, and I’ve been noticing some domains aren’t resolving. Domains that shouldn’t be blocked. It feels like Mullvad’s rules are extra restrictive.

[–] [email protected] 2 points 6 months ago

Same in lastest Mint EDGE release..

[–] [email protected] 2 points 6 months ago

Try using the private IP options instead and see if that works. The generic one being 10.64.0.1, but other options that include ad voicing and such ranging from 100.64.0.1 to 100.64.0.25 or something like that. I've got my entire network setup behind their VPN and a a pihole pointing to one of their private DNS addresses without any issues. I left their pubic DNS years ago so that I could make sure my DNS requests were always within the tunnel instead