If you ended up here looking for how to make your "nameserver 127.0.0.1" stick around nowadays,
edit your /etc/resolvconf.conf
and add the following:
# Defaults to /etc/resolv.conf if not set.
resolv_conf=/etc/resolv.conf
# Prepend name servers to the dynamically generated list.
# You should set this to 127.0.0.1 if you use a local name server other than libc.