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 22.214.171.124 nameserver 126.96.36.199
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 188.8.131.52 nameserver 184.108.40.206
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).