Persistent manual DNS

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Evoka
Level 1
Level 1
Posts: 27
Joined: Fri Jul 10, 2015 10:10 am

Persistent manual DNS

Post by Evoka »

Hello,

I have an issue with the DNS on the wired network connection even when I have everything in auto, the DNS behaves as if it was manually set. I have deleted the network connection, and in the new one the problem persists. I have booted from a usb using the same OS and it works as expected, so it's not hardware nor the router. The DNS is set to 192.168.1.158, 8.8.8.8, 8.8.4.4

Code: Select all

Kernel: 4.4.0-128-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: Cinnamon 3.6.7 (Gtk 3.18.9-1ubuntu3.3)
           Distro: Linux Mint 18.3 Sylvia


Network:   Card: Qualcomm Atheros AR8151 v2.0 Gigabit Ethernet
           driver: atl1c v: 1.0.1.1-NAPI port: d000 bus-ID: 03:00.0
           IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Thank you
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
coffee412
Level 8
Level 8
Posts: 2212
Joined: Mon Nov 12, 2012 7:38 pm
Location: I dont know
Contact:

Re: Persistent manual DNS

Post by coffee412 »

Im not sure from your post what your problem actually is. Could you be a bit more specific?

Are you trying to manually use different DNS servers than what your ISP has? If thats the case, Set them in Network Manager. What desktop are you using? Bit more info would be helpful and then I can help you.

When you are having this issue, Issue the following command to show your DNS settings. Copy the output to your next post :

cat /etc/resolv.conf
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710
- List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
Evoka
Level 1
Level 1
Posts: 27
Joined: Fri Jul 10, 2015 10:10 am

Re: Persistent manual DNS

Post by Evoka »

Hi, the issue is that I do not want that DNS set, I want the ones provided by the router. I only get those when booting from the USB, I have deleted the network profile several times.

Code: Select all

cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search local
Evoka
Level 1
Level 1
Posts: 27
Joined: Fri Jul 10, 2015 10:10 am

Re: Persistent manual DNS

Post by Evoka »

This is booting from the live usb
Image

this is booting from the HD
Image
User avatar
coffee412
Level 8
Level 8
Posts: 2212
Joined: Mon Nov 12, 2012 7:38 pm
Location: I dont know
Contact:

Re: Persistent manual DNS

Post by coffee412 »

When you connect to the router please post the output of the following commands:

cat /etc/resolv.conf

ifconfig
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710
- List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Persistent manual DNS

Post by Flemur »

Evoka wrote: Thu Jun 14, 2018 10:29 pmI have an issue with the DNS on the wired network connection even when I have everything in auto, the DNS behaves as if it was manually set. I have deleted the network connection, and in the new one the problem persists.
Deleted them ... where?
/etc/resolv.conf says "DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN"

I was doing the opposite - trying to set them manually and getting the automatic stuff, so...

Code: Select all

nm-applet 
(I think that starts automatically for normal installs...it's the Wifi/Ethernet icon in your task bar).

nm-applet (=wifi icon) -> rt-click -> edit connections -> (pick connection) -> Edit -> IpV4 settings (tab):
"Method = Automatic (DHCP)" for NO MANUAL settings - you can enter them and they just go away.

"Method = Automatic (DHCP) addresses only." will use the DNS values entered, and they end up in /etc/resolv.conf
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Evoka
Level 1
Level 1
Posts: 27
Joined: Fri Jul 10, 2015 10:10 am

Re: Persistent manual DNS

Post by Evoka »

Code: Select all

$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search local

$ ifconfig
enp3s0    Link encap:Ethernet  direcciónHW 90:2b:34:37:e9:8f  
          Direc. inet:192.168.1.179  Difus.:192.168.1.255  Másc:255.255.255.0
          Dirección inet6: fe80::afb6:79e0:5913:5049/64 Alcance:Enlace
          ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST  MTU:1500  Métrica:1
          Paquetes RX:85001 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:103052 errores:0 perdidos:0 overruns:0 carrier:1
          colisiones:0 long.colaTX:1000 
          Bytes RX:18471384 (18.4 MB)  TX bytes:50198832 (50.1 MB)

lo        Link encap:Bucle local  
          Direc. inet:127.0.0.1  Másc:255.0.0.0
          Dirección inet6: ::1/128 Alcance:Anfitrión
          ACTIVO BUCLE FUNCIONANDO  MTU:65536  Métrica:1
          Paquetes RX:8551 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:8551 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:1 
          Bytes RX:696704 (696.7 KB)  TX bytes:696704 (696.7 KB)
Evoka
Level 1
Level 1
Posts: 27
Joined: Fri Jul 10, 2015 10:10 am

Re: Persistent manual DNS

Post by Evoka »

Flemur wrote: Fri Jun 15, 2018 4:24 pm Deleted them ... where?
In the network connections applet, I have deleted the connection, and still the same issue.


This is the network connection as it is now.
Image
User avatar
coffee412
Level 8
Level 8
Posts: 2212
Joined: Mon Nov 12, 2012 7:38 pm
Location: I dont know
Contact:

Re: Persistent manual DNS

Post by coffee412 »

Evoka wrote: Fri Jun 15, 2018 4:42 pm

Code: Select all

nameserver 127.0.1.1
search local

$ ifconfig
enp3s0    Link encap:Ethernet  direcciónHW 90:2b:34:37:e9:8f  
          Direc. inet:[b]192.168.1.179[/b]  Difus.:192.168.1.255  Másc:255.255.255.0
          Dirección inet6: fe80::afb6:79e0:5913:5049/64 Alcance:Enlace
          ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST  MTU:1500  Métrica:1
          Paquetes RX:85001 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:103052 errores:0 perdidos:0 overruns:0 carrier:1
          colisiones:0 long.colaTX:1000 
          Bytes RX:18471384 (18.4 MB)  TX bytes:50198832 (50.1 MB)
It appears you are not getting your DNS info from the router. Some routers if you have issues getting an I.P address then your network card will default to a private address one. To see which is the case can you connect to the internet and then in a term window run a ping test:

ping 8.8.8.8

If you get replies then your problem is only related to DNS settings and might actually be an issue with the router. You can manually go into network manager (right click panel applet for network and choose edit connections. Edit the IPV4 and see if you can enter your own DNS entries. Use 8.8.8.8 and 1.1.1.1 . If you do not use IPV6 you can go in and disable that.

Lets see if all that works :)
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
Dell PE T610, Dell PE T710
- List your hardware Profile: inxi -Fxpmrz
MeshCentral * Virtualbox * Debian * InvoiceNinja * NextCloud * Linux since kernel 2.0.36
User avatar
Pippin
Level 4
Level 4
Posts: 441
Joined: Wed Dec 13, 2017 11:14 am
Location: The Shire

Re: Persistent manual DNS

Post by Pippin »

What does

Code: Select all

nmcli dev show | grep DNS
look like with default network settings?

If the DNS is shown handed out by your router through DHCP, I would think there is no problem.
I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
Halton Arp
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Persistent manual DNS

Post by Flemur »

Evoka wrote: Fri Jun 15, 2018 4:50 pmThis is the network connection as it is now.
Well, I'm stumped.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Evoka
Level 1
Level 1
Posts: 27
Joined: Fri Jul 10, 2015 10:10 am

Re: Persistent manual DNS

Post by Evoka »

Code: Select all

nmcli dev show | grep DNS
IP4.DNS[1]:                             192.168.1.158
IP4.DNS[2]:                             8.8.8.8
IP4.DNS[3]:                             8.8.4.4
Sorry, I did not understood this:
Pippin wrote: Fri Jun 15, 2018 5:28 pm If the DNS is shown handed out by your router through DHCP, I would think there is no problem.
User avatar
Pippin
Level 4
Level 4
Posts: 441
Joined: Wed Dec 13, 2017 11:14 am
Location: The Shire

Re: Persistent manual DNS

Post by Pippin »

It means that those are in use:
192.168.1.158
8.8.8.8
8.8.4.4
You set those in your router?
If yes, then i would think it works as intended.

dhclient will apply the settings provided by your router.
The DNS servers provided are then used by dnsmasq, which acts as a proxy.
That`s why you see 127.0.1.1 in resolv.conf as that is where dnsmasq listens.
You can check that with

Code: Select all

netstat -atunp
I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
Halton Arp
Evoka
Level 1
Level 1
Posts: 27
Joined: Fri Jul 10, 2015 10:10 am

Re: Persistent manual DNS

Post by Evoka »

Pippin wrote: Sat Jun 16, 2018 9:37 am You set those in your router?
That is exactly the issue here, it should be 192.168.1.18, same as when I boot from the live USB.
Locked

Return to “Networking”