Linux mint change dns

Linux Mint Forums

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

Carl Level 5
Posts: 698 Joined: Wed Apr 15, 2009 5:20 pm Location: Isle of Wight, UK

[SOLVED] Change DNS Settings?

Post by Carl » Thu Jul 26, 2018 4:58 pm

How do I go about changing the DNS settings from within Linux Mint 19? unfortunately I cannot change them in my router so this is the next best thing

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

Pjotr Level 23
Posts: 19049 Joined: Mon Mar 07, 2011 10:18 am Location: The Netherlands (Holland) 🇳🇱 Contact:

Re: Change DNS Settings?

Post by Pjotr » Thu Jul 26, 2018 5:00 pm

Tip: 10 things to do after installing Linux Mint 21.2 Victoria
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

Carl Level 5
Posts: 698 Joined: Wed Apr 15, 2009 5:20 pm Location: Isle of Wight, UK

Re: Change DNS Settings?

Post by Carl » Thu Jul 26, 2018 5:04 pm

Thank you but unfortunately xed says it cannot find that file? «Could not find the file admin:///etc/resolvconf/resolv.conf.d/tail.»

Pjotr Level 23
Posts: 19049 Joined: Mon Mar 07, 2011 10:18 am Location: The Netherlands (Holland) 🇳🇱 Contact:

Re: Change DNS Settings?

Post by Pjotr » Thu Jul 26, 2018 5:07 pm

Thank you but unfortunately xed says it cannot find that file? «Could not find the file admin:///etc/resolvconf/resolv.conf.d/tail.»

You’re right. apparently systemd has taken over in that respect, as well. I’ll have to research that a bit.

Tip: 10 things to do after installing Linux Mint 21.2 Victoria
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

Читайте также:  Alpine linux создать пользователя

Carl Level 5
Posts: 698 Joined: Wed Apr 15, 2009 5:20 pm Location: Isle of Wight, UK

Re: Change DNS Settings?

Post by Carl » Thu Jul 26, 2018 5:21 pm

To change your system to use the OpenDNS servers (this is for Mint 19 — adapt accordingly for your distro/version):

sudo cp /etc/resolv.conf /etc/resolv.conf.auto 
xed admin:///etc/dhcp/dhclient.conf 

and add supersede domain-name-servers 208.67.222.222,208.67.220.220; after the require subnet-mask command.

Find out your interface device name with netstat -i and replace device_name below with that device name.

sudo ifconfig device_name down && sudo ifconfig device_name up 

Pjotr Level 23
Posts: 19049 Joined: Mon Mar 07, 2011 10:18 am Location: The Netherlands (Holland) 🇳🇱 Contact:

Re: [SOLVED] Change DNS Settings?

Post by Pjotr » Thu Jul 26, 2018 5:27 pm

I’ve modified my how-to: it can easily be done by means of Network Manager:
https:sites.google.com/site/easylinuxtipsproject/7#TOC-How-to-add-extra-DNS-name-servers-to-your-system
(item 10, right column)
https://easylinuxtipsproject.blogspot.c . .html#ID10
(item 10)

Tip: 10 things to do after installing Linux Mint 21.2 Victoria
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

Re: [SOLVED] Change DNS Settings?

Post by swayne » Mon Aug 12, 2019 10:45 pm

Pjotr wrote: ⤴ Thu Jul 26, 2018 5:27 pm I’ve modified my how-to: it can easily be done by means of Network Manager:
https://sites.google.com/site/easylinux . our-system
(item 10, right column)

Pjotr Level 23
Posts: 19049 Joined: Mon Mar 07, 2011 10:18 am Location: The Netherlands (Holland) 🇳🇱 Contact:

Re: [SOLVED] Change DNS Settings?

Post by Pjotr » Tue Aug 13, 2019 4:29 am

Pjotr wrote: ⤴ Thu Jul 26, 2018 5:27 pm I’ve modified my how-to: it can easily be done by means of Network Manager:
https://sites.google.com/site/easylinux . our-system
(item 10, right column)

Tip: 10 things to do after installing Linux Mint 21.2 Victoria
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

  • Important Notices
  • ↳ Rules & Notices
  • ↳ Releases & Announcements
  • ↳ Main Edition Support
  • ↳ Beginner Questions
  • ↳ Installation & Boot
  • ↳ Software & Applications
  • ↳ Hardware Support
  • ↳ Graphics Cards & Monitors
  • ↳ Printers & Scanners
  • ↳ Storage
  • ↳ Sound
  • ↳ Networking
  • ↳ Virtual Machines
  • ↳ Desktop & Window Managers
  • ↳ Cinnamon
  • ↳ MATE
  • ↳ Xfce
  • ↳ Other topics
  • ↳ Non-technical Questions
  • ↳ Tutorials
  • Debian Edition Support
  • ↳ LMDE Forums
  • ↳ Beginner Questions
  • ↳ Installation & Boot
  • ↳ Software & Applications
  • ↳ Hardware Support
  • ↳ Networking
  • ↳ Tutorials
  • ↳ Other Topics & Open Discussion
  • ↳ LMDE Archive
  • Interests
  • ↳ Gaming
  • ↳ Scripts & Bash
  • ↳ Programming & Development
  • Customization
  • ↳ Themes, Icons & Wallpaper
  • ↳ Compiz, Conky, Docks & Widgets
  • ↳ Screenshots
  • ↳ Your Artwork
  • Chat
  • ↳ Introduce Yourself
  • ↳ Chat about Linux Mint
  • ↳ Chat about Linux
  • ↳ Open Chat
  • ↳ Suggestions & Feedback
  • International
  • ↳ Translations
  • ↳ Deutsch — German
  • ↳ Español — Spanish
  • ↳ Français — French
  • ↳ Italiano — Italian
  • ↳ Nederlands — Dutch
  • ↳ Português — Portuguese
  • ↳ Русский — Russian
  • ↳ Suomi — Finnish
  • ↳ Other Languages
  • ↳ Čeština-Slovenčina — Czech-Slovak
  • ↳ Magyar — Hungarian
  • ↳ 日本語 — Japanese
  • ↳ Polski — Polish
  • ↳ Svenska — Swedish
  • ↳ Українська — Ukrainian
Читайте также:  1 января 1970 linux

Powered by phpBB® Forum Software © phpBB Limited

Источник

Linux Mint Forums

Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

[SOLVED] Howto change DNS servers?

Post by Miss B » Fri Nov 25, 2022 10:30 am

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.

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.

Termy Level 12
Posts: 4221 Joined: Mon Sep 04, 2017 8:49 pm Location: UK Contact:

Re: Howto change DNS servers?

Post by Termy » Fri Nov 25, 2022 12:41 pm

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.

[NEW] Linux support repository here — work in progress.

Re: Howto change DNS servers?

Post by t42 » Fri Nov 25, 2022 2:23 pm

Читайте также:  Linux two factor authentication

Re: Howto change DNS servers?

Post by t42 » Fri Nov 25, 2022 2:31 pm

Termy wrote: ⤴ Fri Nov 25, 2022 12:41 pm /etc/resolv.conf’? .
From looking online, it seems editing that file is (or was) temporary.

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.

Re: Howto change DNS servers?

Post by KodiakCanoe » Fri Nov 25, 2022 2:47 pm

Re: Howto change DNS servers?

Post by Miss B » Sun Nov 27, 2022 3:37 pm

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

# 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

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

Источник

Оцените статью
Adblock
detector