My SOHO lan is served by my main machine which operates as a router, firewall, gateway, DNS, DHCP server and backup server.
I've set up bind9 and isc-dhcp-server to do DDNS for the lan clients, while pppoe sets up the gateway to the net.
The backup server needs to recognise lan clients by hostname so I need it to look up their current IPs on the local DNS.
I'm using Ubuntu 16.04.4
I got quite far (see Dynamic DNS only serving DHCP clients, but new names not resolving on DNS server itself for the
bind9 - dhcpd - ddns setup I did) but I still haven't managed to configure local DNS look-ups on the server.
/etc/resolv.conf looks like this:
adam@gondor:~$ cat /etc/resolv.conf nameserver 126.96.36.199 nameserver 188.8.131.52 domain localdomain search localdomain
This is I assume being written at boot by
pppoe which configures the gateway. There's a
/etc/ppp/resolv.conf that is the same, but I'm not sure what role it plays.
My question is how I should configure linux so that
backuppc will do DNS on the localhost for domain names on the lan, and yet browsing the net in firefox on the same machine will also work.
A colleague advised me to put
/etc/resolvconf/resolv.conf.d/head but that doesn't seem to be a good idea:
adam@gondor:~$ cat /etc/resolvconf/resolv.conf.d/head # 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
I'm also not using
network-manager to control
pppoe which seems to be a popular choice.
[UPDATE After 1st comment] I looked more into the
resolvconf package and discovered that it was out-of-date. I've updated it but I'm now pretty sure that the warning in
head above is warning me not to edit
resolv.conf manually, rather than
It also didn't help that http://manpages.ubuntu.com/manpages/xenial/man8/resolvconf.8.html talks about files that
resolvconf isn't giving me, like
I have also decided that
pppd can't be using
resolvconf, so I have disabled it from updating
/etc/resolv.conf by commenting out the
updatedns option in
/etc/ppp/peers/dsl-provider. I don't want the British Telecom DNS servers anyway, I'm going to configure
resolvconf to use
127.0.0.1, and I'll tell
bind9 to forward to the OpenDNS servers instead.