Manually changing DNS settings ...?

Hey there - once upon a time i manually entered my ISP’s DNS servers in /etc/resolv.conf

Now i have changed ISP, my old DNS setting are still present even though i have edited my resolv.conf file to my new ISP’s DNS servers. Internet still works fine, i just want to use my new ISP’s DNS as my old ISP will be closing its doors very soon.

Am i doing something wrong, or better put… forgot to edit another file…? I did do this a while ago, so i apologise in advance for my incompetence.

I’m stilling running 11.1 / Router has DHCP configured.

my resolv.conf file is below

cat /etc/resolv.conf
### /etc/resolv.conf file autogenerated by netconfig!
#
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
# /etc/sysconfig/network/config file:
#     NETCONFIG_DNS_STATIC_SEARCHLIST
#     NETCONFIG_DNS_STATIC_SERVERS
#     NETCONFIG_DNS_FORWARDER
# or disable DNS configuration updates via netconfig by setting:
#     NETCONFIG_DNS_POLICY=''
#
# See also the netconfig(8) manual page and other documentation.
#
# Note: Manual change of this file disables netconfig too, but
# may get lost when this file contains comments or empty lines
# only, the netconfig settings are same with settings in this
# file and in case of a "netconfig update -f" call.
#
### Please remove (at least) this line when you modify the file!
search config
nameserver 87.194.255.154
nameserver 87.194.255.155

Thanks in advance, cheers

you can edit your DNS settings in YaST under

Network Devices → Network Settings → Hostname/DNS

Hi there - thanks for getting back. When in Network Settings, most setting/option are greyed out due to NetworkManager being enabled. Im usually on wireless, so enabled NetworkManager a while ago. Would you suggest selecting the Traditional method in Network Setting …?

For some reason, my system is stuck on my Previous ISP’s DNS servers… I have also restarted my machine, if anyone is thinking of the obvious :slight_smile:

Are you using KDE or Gnome? Im a KDE guy, so im not sure if this is in gnome…but the Network Manager applet in KDE allows you to manually set your DNS servers.

I wouldnt go with the traditional method unless you have to – it can make wireless a pain in the behind :wink:

Select “Manage Connections” → Wireless Tab → Either add a new connection or edit your current one → IP Address tab → select “Automatic (DHCP) addresses only” from the “Method” dropdown → enter your DNS and search domains in the appropriate boxes.

Hope this helps!

Sorry mate - i should of mentioned i’m running gnome on my 11.1 laptop.

If you click (or right click) on the Network Manager Applet, is there an “edit connections”?

It should be in the same area where you would set your passphrase for the wireless network. There should be a tab called “IPv4 Settings”?

Yoiu have several questions now.

  1. your* resolv.conf* looks syntacticaly correct, but we can of course not say if the IP addresses you have there are the correct ones. The *search config *looks strange to me, but when you have a domain named config there, it could be OK.

  2. ifup vs. Network manager. Use ifup when you connect to the same network all the time, cabled or wifi. Use network manager when you travel around with your system and connect to different networks. The last is OFTEN the case with e.g. laptops and wifi, but it is NOT a law that wifi must use network manager.

Ah right, i understand now the difference between ifup vs. Network Manager - thanks hcvv.

Now the strange thing is, my test windows 7 machine gets all the correct addresses via DHCP, and my 11.1 laptop does not. In Network Manager >> IPv4 tab - When I revert back to Method: Automaic (DHCP) i get my old ISP’s DNS servers again??? It must get getting it from my system somewhere. When i manually enter NetMask / Gateway / DNS address… its shows up fine when i get “Connection Information”.

Would you know where else i can check for DNS settings, apart from the resolv.conf file…? Iv also checked /etc/resolv.conf.bak and /etc/resolv.conf.netconfig

I also commented out “search config” from my resolv.conf - just as a test… nadda :frowning:

Check the value NETCONFIG_DNS_STATIC_SERVERS in /etc/sysconfig/network/config. :wink:

resolv.conf is irrelevant while using dhcp - although you can change DNS on the fly by writing some nameservers in /etc/resolv.conf. But resolv.conf gets overwritten by dhcp requests, unlike statically defined DNS in /etc/sysconfig/network/config. That’s how you would set static DNS while using dhcp (not in /etc/resolv.conf).

Ah right, Thanks please_try_again - that is something i did not know.

cat /etc/sysconfig/network/config | grep DNS_STATIC_SERVERS
NETCONFIG_DNS_STATIC_SERVERS=""

The above shows its not present, so i may make manual entries as a test. Would the Syntax be

e.g.

NETCONFIG_DNS_STATIC_SERVERS="1.2.3.4" "5.6.7.8"

or

e.g.

NETCONFIG_DNS_STATIC_SERVERS="1.2.3.4, 5.6.7.8"

Thanks again, iv learned something new lol

NETCONFIG_DNS_STATIC_SERVERS="1.2.3.4 5.6.7.8"

No comma! At most three IPs separated with blanks.

You could also do it in:
YaST -> System -> /etc/sysconfig Editor

  • Network
    … - General
    …- NETCONFIG_DNS_STATIC_SERVERS

Thanks please_try_again - i just did it via sysconfig Editor :slight_smile:

And your the man, its wuuurking :slight_smile: lol !!

Tips hat @ please_try_again - thanks once again, cheers…!!

On 2011-01-09 19:36, vmohan wrote:

>> …- NETCONFIG_DNS_STATIC_SERVERS
>
> Thanks please_try_again - i just did it via sysconfig Editor :slight_smile:

Did you read your own resolv.conf file you posted yourself? Because it says it there, where you are
to write the changes; and that if you do manual changes on that file, further autoconfiguration will
not work.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Minas Tirith))

Well I totally missed that one, your right Mr robin_listas - Thanks for pointing that out…