We are running a script that tries to resolve thousands of domains for a research project. The issue we are having is that a lot of domains are not resolvable for example
foo.com. If we ping
foo.com the system will do a lookup for
foo.com. If that does not resolve, it will do a lookup for
/etc/resolv.conf we had:
# Generated by NetworkManager search ourdomain.com nameserver 184.108.40.206 nameserver 220.127.116.11
The above result is expected since we had the search setting set. If we changed it to say:
# Generated by NetworkManager search ourdomain.net nameserver 18.104.22.168 nameserver 22.214.171.124
then as expected any non-resolvable query will be queried again with ourdomain.net at the end.
The issue that we have is if we remove the search line completely from
resolv.conf then system goes back to using ourdomain.com as the search. What we want is if a DNS lookup does not resolve to NOT then look it up with the domain that WAS set in
resolv.conf (which is also the domain of the box).