On a Debian-based linux device I need to set up DNS lookups on two different DNS nameservers - one for local domain lookups, one for everything else.
My /etc/resolv.conf currently is:
# Generated by resolvconf domain delta search delta nameserver 127.0.0.1 nameserver 192.168.200.1
The first nameserver on lo resolves almost anything, just not my local devices on the LAN ('delta'), which are resolved by dnsmasq on 192.168.200.1. I added the second nameserver manually for testing (resolvconf only adds 127.0.0.1). DNS requests on lo are redirected by an iptable rule to the WAN.
What I see with this /etc/resolv.conf is e.g.
> host cnn.com cnn.com has address 188.8.131.52 > host alpha.delta Host alpha.delta not found: 3(NXDOMAIN) > host alpha.delta 192.168.200.1 Using domain server: Name: 192.168.200.1 Address: 192.168.200.1#53 Aliases: alpha.delta has address 192.168.200.99
Two main questions right now:
- Why isn't the lookup trying the second (local) DNS server? It's working if I specify it in the host command.
- What is the best way to configure it, so that local domain lookups are served from a separate, local server (apart from the standard, outside one). Obviously /etc/resolv.conf could be overwritten; I tried to change /etc/resolvconf.conf but that did not update /etc/resolv.conf after a resolvconf -u.
I hope this is not a dumb question; I'm still trying to understand and learn about name resolution. So an kind of hints are welcome!