(Mint 19 Beta) dns-nameservers term no longer works

Questions about cabled networking
Forum rules
Before you post please read how to get help
Post Reply
Altersoundwork
Level 1
Level 1
Posts: 7
Joined: Fri Jun 15, 2018 5:00 am

(Mint 19 Beta) dns-nameservers term no longer works

Post by Altersoundwork » Fri Jun 15, 2018 5:23 am

Hi all,

I'm wondering if I'm doing something wrong as I'd imagine it wouldn't be just me with this issue and yet, I couldn't find an answer.

So I'm using 18.3 KDE as my daily driver and I'm testing out 19 Mate as the soon-to-be replacement. My /etc/network/interfaces file looks like this on 18.3

Code: Select all

auto lo
iface lo inet loopback

dns-nameservers 192.168.4.100

auto ens33

iface ens33 inet static
address 192.168.4.239
netmask 255.255.255.0
gateway 192.168.4.100
This works fine on Mint 18.3 KDE but does not on 19 Mate (no internet connectivity). When I check the network settings through the GUI on Mint 19, I see that the DNS Nameservers haven't been saved (although everything else within the etc/network/interfaces file is shown here so my question is, has the the way the dns-nameservers term on etc/network/interfaces work been changed? And if so, what's the new way of doing it? I'd rather be able to do it through terminal rather than depend on the gui.

Thanks in advance! :)

JeremyB
Level 19
Level 19
Posts: 9033
Joined: Fri Feb 21, 2014 8:17 am

Re: (Mint 19 Beta) dns-nameservers term no longer works

Post by JeremyB » Fri Jun 15, 2018 5:43 am

Yes networking has changed, see https://netplan.io/
I haven't done anything with netplan yet

User avatar
catweazel
Level 16
Level 16
Posts: 6977
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: (Mint 19 Beta) dns-nameservers term no longer works

Post by catweazel » Fri Jun 15, 2018 5:50 am

JeremyB wrote:
Fri Jun 15, 2018 5:43 am
Yes networking has changed, see https://netplan.io/
I haven't done anything with netplan yet
Prepare for a mountain of posts about network issues.
Caution: Dancing Wu Li Master and Official curmudgeon-in-chief

User avatar
catweazel
Level 16
Level 16
Posts: 6977
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: (Mint 19 Beta) dns-nameservers term no longer works

Post by catweazel » Fri Jun 15, 2018 5:52 am

Altersoundwork wrote:
Fri Jun 15, 2018 5:23 am

Code: Select all

auto ens33
Please post the output of this command:

cat /proc/net/dev | awk '{print $1}'
Caution: Dancing Wu Li Master and Official curmudgeon-in-chief

Altersoundwork
Level 1
Level 1
Posts: 7
Joined: Fri Jun 15, 2018 5:00 am

Re: (Mint 19 Beta) dns-nameservers term no longer works

Post by Altersoundwork » Fri Jun 15, 2018 6:02 am

Firstly, thank you all for your replies. As I feared, it's due to a change.

So I found a solution that doesn't require playing with netplain.

1: Run the command:

Code: Select all

sudo apt install resolvconf
2: Edit /etc/resolvconf/resolv.conf.d/tail and add the nameser/s of choice (one per line). In my specific case and for the sake of an example it is as follows:

Code: Select all

nameserver 192.168.4.100
This line/s will be added at the end of /run/resolvconf/resolv.conf at boot.

Original source: "Oscar1919" -> https://askubuntu.com/questions/1012641 ... ect=1&lq=1

*-------------------*

@catweazel

Not sure if this applies any longer after the aforementioned "solution" but:

Code: Select all

xxxx@vm-mint19-mate:~$  cat /proc/net/dev | awk '{print $1}'
Inter-|
face
lo:
ens33:
As for Netplain, the examples shown on the website seem pretty straight forward, though I'd add this here for anyone that wants to give it a go -> https://netplan.io/examples

ewaldc
Level 1
Level 1
Posts: 3
Joined: Mon Aug 14, 2017 2:35 am

Re: (Mint 19 Beta) dns-nameservers term no longer works

Post by ewaldc » Sat Aug 11, 2018 6:22 am

Another simple solution to fix DNS lookup without the need to install resolvconf...
Systemd maintains /run/systemd/resolve/resolv.conf with the proper DNS information as per the new systemd-resolve service.
However /etc/resolv.conf is a symbolic link to ../run/resolvconf/resolv.conf which resolves all names via 127.0.0.53.
This breaks queries from root zone (.), like local server lookups such as nslookup mylocalserver (see https://github.com/systemd/systemd/issues/4621 and https://github.com/systemd/systemd/issues/5897
It also causes issues with applications that lookup DNS servers via /etc/resolv.conf since all they find is 127.0.0.53.

This worked perfectly for me and did not break systemd services.

Code: Select all

sudo mv /etc/resolv.conf /etc/resolv.conf.orig
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
Ewald

Post Reply

Return to “Ethernet”