[SOLVED] Howto change DNS servers?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
[SOLVED] Howto change DNS servers?
How can I change DNS servers in Linux Mint 20.3 Mate?
I can add DNS servers through the GUI, but I want to get rid of the current DNS servers.
I attempted to follow the guide to create a new /etc/resolv.conf on NordVPN, but then I just lost the internet connection.
Thanks in advance.
I can add DNS servers through the GUI, but I want to get rid of the current DNS servers.
I attempted to follow the guide to create a new /etc/resolv.conf on NordVPN, but then I just lost the internet connection.
Thanks in advance.
Last edited by LockBot on Thu May 25, 2023 10:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Howto change DNS servers?
Been a long time since I looked into this but don't you just change the value for the
nameserver
parameter in '/etc/resolv.conf'? Perhaps you used the wrong IP or something. I'm not entirely sure. From looking online, it seems editing that file is (or was) temporary. Apparently you can specify multiple domain name servers by way of priority, using that file. Simply changing the existing IP may not be desired. Apparently making relevant changes to '/etc/systemd/resolved.conf' (via SystemD) will make the changes permanent.I'm also Terminalforlife on GitHub.
Re: Howto change DNS servers?
Mentioned by OP NordVPN method includes
chattr +i /etc/resolv.conf
so nothing is temporary here Not that manually editing files is a way to go, still NetworkManager is a preferred choice. But not if the system has various VPN scripts leftovers.
-=t42=-
-
- Level 3
- Posts: 113
- Joined: Wed Nov 23, 2022 12:30 am
Re: Howto change DNS servers?
My /etc/resolv.conf always reads whether I'm connected to Nord or not. I use the Nord app and by default it will use their DNS.
Code: Select all
nameserver 127.0.0.53
Re: Howto change DNS servers?
Hi all
Thanks for looking into this.
It's not that I use NordVPN, I only used their guide.
I do not know which content the resolv.conf file had before I deleted it, but the content of the file on the computer I am currently using, is
The file does currently only contain comments. According to man resolved.conf these commented out entries 'showing the defaults as a guide to the administrator', and this is how I understand what to do. I am not sure though.
Tomorrow I expect to be able to look at the computer that should have its DNS settings changed. Then I can also check the output of netstat -lnptu
Thanks for looking into this.
It's not that I use NordVPN, I only used their guide.
I do not know which content the resolv.conf file had before I deleted it, but the content of the file on the computer I am currently using, is
It is beginning to be a bit long haired for me, but maybe I can just add# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
options edns0 trust-ad
to /etc/systemd/resolved.conf?DNS=91.239.100.100 89.233.43.71
The file does currently only contain comments. According to man resolved.conf these commented out entries 'showing the defaults as a guide to the administrator', and this is how I understand what to do. I am not sure though.
Tomorrow I expect to be able to look at the computer that should have its DNS settings changed. Then I can also check the output of netstat -lnptu
Re: Howto change DNS servers?
Seems like you have the right idea. I was confused at first, because you posted what looks like '/etc/resolv.conf', then talked about adding a line to '/etc/systemd/resolved.conf', but I now understand. From looking at the resolved.conf(5) man page, the
DNS
parameter does seem like what you want, and nice work spotting that, when using multiple DNS IPs, they should be whitespace-delimited.I'm also Terminalforlife on GitHub.
[SOLVED] Howto change DNS servers?
I succeeded getting uncensored on the internet, but not by editing the settings on my computer, where it did not seem to be possible to get rid of the current DNS servers.
Instead I did it on the router. "the" because it is not my own router, it is provided by my ISP. So now it is just a question for how long that is going to work, I fear that they remotely will reset it to their own default settings, so that I soon will be using their DNS servers again. Time will show.
Thanks for trying to help me with this.
PS: I do not seem to be able to edit the topic of the original post for this topic...?
Instead I did it on the router. "the" because it is not my own router, it is provided by my ISP. So now it is just a question for how long that is going to work, I fear that they remotely will reset it to their own default settings, so that I soon will be using their DNS servers again. Time will show.
Thanks for trying to help me with this.
PS: I do not seem to be able to edit the topic of the original post for this topic...?
Re: [SOLVED] Howto change DNS servers?
Damn it, I totally forgot you can set the DNS in the router! I haven't come across that in a long time, so it didn't even occur to me. It's confusing to me that the router and the OS can specify it. I guess it's like the firewall, where the router ultimately has the power, and the OS is secondary.
To the right of the area holding your initial post, look at the top-right, where you should find a small Edit button.
I'm also Terminalforlife on GitHub.
Re: [SOLVED] Howto change DNS servers?
In such a case why not to use Setting up DNS over TLS (DOT) Queries and DNS cache using Stubby and DNSMASQMiss Bit wrote: ⤴Mon Nov 28, 2022 11:56 am
Instead I did it on the router. "the" because it is not my own router, it is provided by my ISP. So now it is just a question for how long that is going to work, I fear that they remotely will reset it to their own default settings, so that I soon will be using their DNS servers again. Time will show.
Here is a setup for Uncensored provider, DNS requests are encrypted:
Code: Select all
############################ DEFAULT UPSTREAMS ################################
## The Uncensored DNS servers
- address_data: 91.239.100.100
tls_auth_name: "anycast.censurfridns.dk"
#
## The Uncensored DNS servers
- address_data: 89.233.43.71
tls_auth_name: "unicast.censurfridns.dk"
Code: Select all
# The getdnsapi.net server
- address_data: 185.49.141.37
tls_auth_name: "getdnsapi.net"
tls_pubkey_pinset:
- digest: "sha256"
value: foxZRnIh9gZpWnl+zEiKa0EJ2rdCGroMWm02gaxSc9Q=
-=t42=-
Re: [SOLVED] Howto change DNS servers?
Thank you t42,
I will have a closer look at that if my current setup will be reset by the ISP.
I will have a closer look at that if my current setup will be reset by the ISP.