Test additional name servers

After I edit resolve.conf to say, add a nameserver, if I run a command like host -v google.com I find (not surprisingly) that it still uses the first nameserver, so I can’t confirm that my 2nd and 3rd are correct. Is there a way to “simulate” that the first nameserver is unavailable? I’d rather not comment it out of the file, I’d rather test the file as-is but see the dns resolution trying the additional ones I created. Any ideas?

@Schollii You could simply block all outgoing traffic to the nameserver’s ip you want to simulate as unavailable, by using iptables for example.

Let’s say your first nameserver is 1.1.1.1, you could block it with:

iptables -A OUTPUT -d 1.1.1.1 -j DROP

To unblock it simply replace -A with -D in the command.

Blocking both the first and second nameserver should force using the third.

Thanks I will try that