Making resolv.conf changes permanant

Chris cpollock at embarqmail.com
Thu Apr 30 16:39:14 UTC 2015


I too like Steven in another post am trying to setup Bind9 to work as a
caching name server. I can manually change /etc/resolv.conf to show:

nameserver 192.168.0.1

I can run the example in the same link as Stephen supplied and it works
fine:
chris at localhost:~$ dig linuxfoundation.org

; <<>> DiG 9.9.5-3ubuntu0.2-Ubuntu <<>> linuxfoundation.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40977
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1280
;; QUESTION SECTION:
;linuxfoundation.org.		IN	A

;; ANSWER SECTION:
linuxfoundation.org.	903	IN	A	140.211.169.4

;; Query time: 18 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Thu Apr 30 11:25:09 CDT 2015
;; MSG SIZE  rcvd: 64

Next according to the directions I go to /etc/network/interfaces and set
it like this:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface eth0 lo inet loopback
dns-nameservers 192.168.0.1

When I'm finished I run sudo resolvconf -u and /etc/resolv.conf reverts
back to
# 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


nameserver 127.0.1.1
search PK5001Z

Looking at my DSL modem setup I see:

DNS Host Mapping List:
Device
Name 	IP Address 	DNS Name
ZyXEL 
PK5001Z	192.168.0.1	modem

So, what the heck am I missing? The reason for this - I run spamassassin
and my ISP, Embarq/CenturyLink is on the reject list for queries at
URIBL.com so, I'm hoping a caching nameserver will prevent this.


-- 
Chris
KeyID 0xE372A7DA98E6705C
31.11°N 97.89°W (Elev. 1092 ft)
11:18:45 up 2 days, 19:13, 4 users, load average: 0.05, 0.14, 0.20
Ubuntu 14.04.2 LTS, kernel 4.0.0-997-generic #201503310205 SMP Tue Mar
31 02:07:04 UTC 2015





More information about the ubuntu-users mailing list