Linux Mint DNS Issue

Discussion in 'all things UNIX' started by Krusty, Apr 29, 2024.

  1. Krusty

    Krusty Registered Member

    Joined:
    Feb 3, 2012
    Posts:
    10,261
    Location:
    Among the gum trees
    I've set the DNS to use CleanBrowsing DNS but when I check https://www.dnsleaktest.com/ it shows I'm still using my ISP's DNS in my modem / router. How do I get Mint 21.3 to use my preferred DNS address and NOT my ISPs?

    The machine has been restarted a few times but it has not helped.

    Thanks.

    Screenshot from 2024-04-29 16-39-33.png

    Screenshot from 2024-04-29 16-41-22.png
     
  2. Krusty

    Krusty Registered Member

    Joined:
    Feb 3, 2012
    Posts:
    10,261
    Location:
    Among the gum trees
    Well, I think it might be time to reinstall Mint. I noticed that a few programs I had pinned to the panel were no longer pinned. Easy enough to re-pin them, but I tried Timeshift to restore an Snapshot. Went through to where it said to close programs and save my work, the machine would restart once restored. Nothing happened after that at all - nothing. I've never tried a restore before, but to me it looks to be broken as well.

    I've had a good run with it for a few years now, so it's probably due for a freshen up.
     
  3. longshots

    longshots Registered Member

    Joined:
    Oct 20, 2017
    Posts:
    553
    Location:
    Australia
    I feel your pain. There has been more than one occasion where my Mint has gone of the rails.
    But, as I use a separate 250Gb OS only drive the whole thing only takes a few hours.
     
  4. mnosteele

    mnosteele Registered Member

    Joined:
    Oct 19, 2003
    Posts:
    196
    Location:
    Chesapeake, VA USA
    The best way to set custom DNS using CleanBrowsing is the following:

    systemd-resolved

    Use the following in /etc/systemd/resolved.conf:

    [Resolve]
    DNS=185.228.168.9
    DNS=185.228.169.9
    DNS=2a0d:2a00:1::2
    DNS=2a0d:2a00:2::2
    DNSOverTLS=yes

    I'm currently using Fedora and it's as simple as opening the folder /etc/systemd/resolved.conf and editing it then save and reboot. When I used Mint it's a bit different, you have to open the file as sudo (admin) for you to be able to edit it. Doing it this way it sets DNS for ALL connections, even if you are using a VPN.
     
  5. Krusty

    Krusty Registered Member

    Joined:
    Feb 3, 2012
    Posts:
    10,261
    Location:
    Among the gum trees
    That's great, but I'm a fairly basic Linux user so I'm not sure exactly what I'd need to do. Could you dumb it down for a Windows user to understand?

    Thanks.
     
  6. mnosteele

    mnosteele Registered Member

    Joined:
    Oct 19, 2003
    Posts:
    196
    Location:
    Chesapeake, VA USA
    Go to the folder /etc/systemd then open the file "resolved.conf:" as the Admin (if I remember correctly in Mint it's in your toolbar), then select everything in that file (copy and paste everything in the file to a document as a backup) then replace the contents of that file with:

    [Resolve]
    DNS=185.228.168.9
    DNS=185.228.169.9
    DNS=2a0d:2a00:1::2
    DNS=2a0d:2a00:2::2
    DNSOverTLS=yes

    Save and restart your pc for changes to take effect.
     
  7. Krusty

    Krusty Registered Member

    Joined:
    Feb 3, 2012
    Posts:
    10,261
    Location:
    Among the gum trees
    OK, here's the current info in "resolved.conf:"

    Code:
    #  This file is part of systemd.
    #
    #  systemd is free software; you can redistribute it and/or modify it under the
    #  terms of the GNU Lesser General Public License as published by the Free
    #  Software Foundation; either version 2.1 of the License, or (at your option)
    #  any later version.
    #
    # Entries in this file show the compile time defaults. Local configuration
    # should be created by either modifying this file, or by creating "drop-ins" in
    # the resolved.conf.d/ subdirectory. The latter is generally recommended.
    # Defaults can be restored by simply deleting this file and all drop-ins.
    #
    # Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config.
    #
    # See resolved.conf(5) for details.
    
    #DNS=
    #FallbackDNS=
    #Domains=
    #DNSSEC=no
    #DNSOverTLS=no
    #MulticastDNS=no
    #LLMNR=no
    #Cache=no-negative
    #CacheFromLocalhost=no
    #DNSStubListener=yes
    #DNSStubListenerExtra=
    #ReadEtcHosts=yes
    #ResolveUnicastSingleLabel=no
    [Resolve]
    # Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
    # Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
    # Google:     8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google
    # Quad9:      9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
    I tried replacing that but lost internet. Thank heavens for the backup. I tried slipping everything you suggested in just after [Resolve], restarted and no internet. I'm close...
     
  8. Krusty

    Krusty Registered Member

    Joined:
    Feb 3, 2012
    Posts:
    10,261
    Location:
    Among the gum trees
    Here is the contents of resolved.conf.d/ subdirectory:
    Code:
    # To override these values, create your own file in /etc/systemd/systemd.conf.d/60_custom.conf.
    # Reload configuration with "sudo systemctl daemon-reload"
    # Test with "systemctl show"
    
    [Manager]
    
    # Reduce shutdown timeout from 90s to 10s.
    # If you rely on important tasks to successfully finish during the shutdown sequence, set the timeout to something greater than 90s.
    DefaultTimeoutStopSec=10s
    
    # Rationale:
    # This is done for the following reasons:
    # - 90s is too long for users to wait (they think it's hanging indefinitely, and they eventually just use their power button)
    # - Cups, minidlna have made this a buggy mess for years now and there's no sign of improvement for the near future
    # - This is a workaround many people have used in Mint, Ubuntu, Arch, Fedora and many other distributions, although reducing the start
    # timeout is known to possibly affect the journal, no adverse effects were reported after reducing the stop timeout.
    # - For our audience (desktop users), this makes a lot of sense. It would be different for a server, or a machine which relies on shutdown
    # scripts to perform important tasks, but for most people this fixes a very important issue and is unlikely to create new ones.
     
  9. Krusty

    Krusty Registered Member

    Joined:
    Feb 3, 2012
    Posts:
    10,261
    Location:
    Among the gum trees
    Never mind. The right-click context menu is broken now too. I can't copy / paste anything from Firefox or Brave. Time to reinstall, I'm afraid.
     
  10. Krusty

    Krusty Registered Member

    Joined:
    Feb 3, 2012
    Posts:
    10,261
    Location:
    Among the gum trees
    It doesn't take that long to reinstall Mint, and as this machine is really just a toy, I don't have personal files on it. Next step is to configure Firefox, which is what I've been dreading the most.
     
  11. xxJackxx

    xxJackxx Registered Member

    Joined:
    Oct 23, 2008
    Posts:
    8,693
    Location:
    USA
    Yep, that's my gripe with Linux in general. When you start having issues a reinstall is about the only way to fix it.
     
  12. Krusty

    Krusty Registered Member

    Joined:
    Feb 3, 2012
    Posts:
    10,261
    Location:
    Among the gum trees
    Thankfully, as I mentioned above, Linux is just a toy for me at the moment, but I can imagine the headache if it was my daily driver with important stuff stored. I'll probably be faced with that problem, at least on one machine, once Win10 goes EOL.

    That said, after several years of updates and upgrades, I did get a good run out of it. Some people install fresh every time a new version of their chosen OS is released. That's not for me.
     
  13. Stupendous Man

    Stupendous Man Registered Member

    Joined:
    Aug 1, 2010
    Posts:
    2,871
    Location:
    the Netherlands
    I have no experience with Mint. With Kubuntu, I keep root and /home on separate partitions, and with the LTS dot release, I do a partially clean installation, keeping /home.
    That way, some applications need to be reinstalled, but most settings are kept.
    https://www.kubuntuforums.net/showthread.php/77354-Upgrade-but-save-Home

    That way, Firefox settings are kept as well.
    However, if you need to do a full clean install, and you dread to configure Firefox all over again, you could save your old Firefox profile and restore it to your new installation.
    https://support.mozilla.org/en-US/kb/back-and-restore-information-firefox-profiles
    (By the way, my Firefox profile is not xxxxxxxx.default as mentioned in Mozilla Support, but xxxxxxxx.default-release.)
     
  14. reasonablePrivacy

    reasonablePrivacy Registered Member

    Joined:
    Oct 7, 2017
    Posts:
    2,019
    Location:
    Member state of European Union
    My experience is completely reverse to yours. Windows was my first OS and I still don't know where you have all info what and where to change in regedit (Windows registry) to troubleshoot problems and fix them. format c: is one of the most important Windows command for me.

    On Linux configuration is based on text files and all of main config files come together with manual, so I can try fix them even without Internet access, athough searching Web is usually a faster route.
     
  15. sdmod

    sdmod Shadow Defender Expert

    Joined:
    Oct 28, 2010
    Posts:
    1,170
    I tried Linux Mint some time ago and for a while I was thrilled and loved it. I did all the updates etc. even moving on to later versions ..until one day I (not being an expert or familiar with Linux) or a Linux process did something wrong and I was faced with some black unfathomable 'rescue' screen. The whole setup was completely mangled and I lost all my data, 'backups' and software updates and was unable to install Mint on that PC after that. Subsequently and after a break, in which my nerves were frayed by the experience and began to heal somewhat slowly and painfully from the blow to my pride and dignity, I started afresh and this time when I had set up Linux Mint to my liking and put all my favourite things on there. I used 'Image for Linux' to make an image and then put it quickly on two or three laptops. This was unexpectedly a painless process, most likely due to good luck, rather than good management.This made me feel a little more secure.
    I am a GUI Linux Mint user only and rarely use the command prompt and am too late in life, I'm an old dog that doesn't want to learn new tricks.although I toyed with Unix in the past briefly when I was learning computer stuff.
    On the version that failed I had used the Linux Mint Time back machine or whatever it is called but in the panic of the moment everything went bad.
    I could never install anything on that PC after that I would get all sorts of weird messages and it blocked me with a rescue message popping up. I hadn't got the wits to get past that point even with nights of reading and 'research' looking into forums for tips and hoping for a 'magic button' solution. I think (with hindsight) maybe it could have been a graphics driver/card problem. Linux Mint would never install whatever I did, even after I put fresh drives on the PC..the best I got was a near install then failure. I just run Knoppix from dvd on that machine now
    I have my 'mage for Linux' backup image of Linux Mint safely tucked away now and am happy again just going by quietly from day to day my Linux journey. Lots of updates all the time though, which I'm wary of now.
    I'd never made an 'image' until this point...I'd always cloned in Windows and used Shadow Defender and Sandboxie so was fairly 'bulletproof' I also used standalone anti virus to check things before keeping permanently
    . I've had my 'moments' crashes and failures in Windows over the years msdos Windows 3.0, 3.1, 95 , 95 B, 98, 98, second edition 2000, XP and service packs, Vista, 8, 10 and some other 'flavours' that I've forgotten now also but being jerked out of my 'reverie' by my new friend Linux Mint was a shock that I still haven't recovered from entirely. I'd struggled with Linux trying to get it installed over many years but never could get it to work and in those days Linux people were often unhelpful and even aggressive or rude to 'newbies' from the outset, when approached.
    Those, 'in the 'know' always used to say about computers and data 'Backup, backup, backup'...even when times are good. That would be my advice to anyone irrespective of their status, mood, or ability.
    These things can happen to anyone and often do...quite 'out of the blue', when we least expect them and we're 'riding high' one second...'dumped in the gutter', the next. I know that I we can't creep along softly and carefully all our lives, we wouldn't be human if we lived like that, but a little bit of 'reserve' and caution does not do any harm. having said that, I'll probably drop off another 'cliff' next week. :)
    All philosophies turn to dust. 'the best laid plans of mice and men' etc
    Sorry I forgot that this thread was about Linux Mint DNS issue.
     
  16. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,194
    Location:
    NSW, Australia
    I just installed a second Linux Mint in a Multi-boot Linux / Microsoft UEFI computer.

    Created a 20 GB Linux native partition.
    Booted Mint UFD
    Install
    Something Else
    Chose dev/sdb9 (the Linux native partition just created)
    ext4, Format, /
    Boot Loader installed to the ESP, dev/nvme0n1p1
    Install now
    name, password
    restart
    timedatectl set-local-rtc (To make the BIOS use Local time instead of UTC)

    Finished. It took 13 minutes. I don't create other Linux partitions. Linux can use NTFS partitions for data.

    Backed up with IFL.
     
    Last edited: May 7, 2024
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.