Nameserver change after a few minutes of wireless connection

Hi folks,

I’m running openSUSE 12.1 (x86_64) and while on a wired connection, everything works fine. However, if I switch to wireless, the nameserver list gets changed after a few minutes, so I cannot resolve any domain names any more. The last line of /etc/resolve.conf then reads


nameserver 192.168.1.1

I’m not sure which program makes this entry. Before, it was


nameserver 8.8.8.8

The important part of /etc/sysconfig/network/config follows:


## Type:        string
## Default:     "auto"
#
# Defines the DNS merge policy as documented in netconfig(8) manual page.
# Set to "" to disable DNS configuration.
#
NETCONFIG_DNS_POLICY="auto"

## Type:        string(resolver,bind,dnsmasq,)
## Default:     "resolver"
#
# Defines the name of the DNS forwarder that has to be configured.
# Currently implemented are "bind", "dnsmasq" and "resolver", that
# causes to write the name server IP addresses to /etc/resolv.conf
# only (no forwarder). Empty string defaults to "resolver".
#
NETCONFIG_DNS_FORWARDER="resolver"

## Type:        yesno
## Default:     yes
#
# When enabled (default) in forwarder mode ("bind", "dnsmasq"),
# netconfig writes an explicit localhost nameserver address to the
# /etc/resolv.conf, followed by the policy resolved name server list
# as fallback for the moments, when the local forwarder is stopped.
#
NETCONFIG_DNS_FORWARDER_FALLBACK="yes"

## Type:        string
## Default:     ""
#
# List of DNS domain names used for host-name lookup.
# It is written as search list into the /etc/resolv.conf file.
#
#
NETCONFIG_DNS_STATIC_SEARCHLIST="8.8.8.8 8.8.4.4"

## Type:        string
## Default:     "auto"
#
# List of DNS nameserver IP addresses to use for host-name lookup.
# When the NETCONFIG_DNS_FORWARDER variable is set to "resolver",
# the name servers are written directly to /etc/resolv.conf.
# Otherwise, the nameserver are written into a forwarder specific
# configuration file and the /etc/resolv.conf does not contain any
# nameservers causing the glibc to use the name server on the local
# machine (the forwarder). See also netconfig(8) manual page.
#
NETCONFIG_DNS_STATIC_SERVERS="8.8.8.8 8.8.4.4"

## Type:        string
## Default:     "auto"
#
# Allows to specify a custom DNS service ranking list, that is which
# services provide preferred (e.g. vpn services), and which services
# fallback settings (e.g. avahi).
# Preferred service names have to be prepended with a "+", fallback
# service names with a "-" character. The special default value
# "auto" enables the current build-in service ranking list -- see the
# netconfig(8) manual page -- "none" or "" disables the ranking.
#
NETCONFIG_DNS_RANKING="auto"

Any ideas? Thanks!

I should say you should try to change on the first (non comment) line “auto” to “”. You do not want any auto change to what you have.

Right, that did the trick! Thanks!

You are welcome.

Also,
If you’re using Network Manager (because you sometimes connect using a Wireless connection), you can specify your own DNS nameservers separate from what DHCP is providing.

If this is a wireless within your company LAN and you’re not the SysAdmin, I’d also recommend you contact IT and tell them the AP is mis-configured… obviously it’s forwarding DNS requests to a Public DNS instead of your LAN DNS… Should solve the problem not only for yourself but also others.

HTH,
TS

Hi
On a public wifi I would recommend you force the use of your own DNS.
Use opendns 208.67.222.222 and 208.67.220.220

You don’t want to be like this;
http://www.stuff.co.nz/technology/digital-living/6661361/Kiwis-face-web-blackout


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.13-0.27-default
up 5:26, 3 users, load average: 0.04, 0.04, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU