DNS settings with DHCP


#1

After some time using TrueOS without any problems, suddendly when I connect to any wireless network, my system picks up some old DNS servers from a connection I made 2 montths ago.

I saw a line

supersede domain-name-servers 150.244.9.100;

in the file /etc/dhclient.conf and removed it, but even with a clean and empty /etc/dhclient.conf the system insists in using 150.244.9.100 as DNS for any connection.

I have searched 150.244.9.100 in every file in /etc and is nowhere. I cannot imagine how dhcp picks this address for the DNS.

I remember having the same problem with PCBSD some years ago that only went away after a re-install.

So the queestion is, how is possible that my system picks up this address for the DNS.

Thanks,

A


#2

On my system. as does Linux, it grabs the info from your ISP as soon as it connects.

So it always shows my ISP info for att


#3

Hi,

In fact the normal behavior is to pick up the dns servers from the dhcp server (nothing to do with the ISP, although usually the router from your ISP provides the ISP DNS address).

The problem here is that for some reason my TrueOS does not do this anymore, and picks always the DNS of some old connection. I cannot figure out how to change this anymore.

A.


#4

If you are using WI-FI, I seem to remember that from time-to-time, the network manager GUI would for some reason change its setting from “Obtain settings automatically” to something like “Only use these DNS settings”.

I never figured out what triggered that, but it seems like some sort of settings bug (and I’m not anywhere close to a machine where I could check the actual phrasing). Try looking at the network manager GUI and see if this settings has been flipped for you. If you set it back to automatically obtain the settings and restart it, it should work for you.


#5

First disable resolvconf:
$ cat /etc/resolvconf.conf
# disable resolvconf
resolvconf=NO
# EOF

Put your nameserver in resolv.conf
$ cat /etc/resolv.conf
nameserver 192.168.100.1
nameserver 8.8.8.8
# EOF