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 foo.com.ourdomain.com. It /etc/resolv.conf we had:# Generated by NetworkManagersearch ourdomain.comnameserver 8.8.8.8nameserver 4.2.2.2The above result is expected since we had the search setting set. If we changed it to say:# Generated by NetworkManagersearch ourdomain.netnameserver 8.8.8.8nameserver 4.2.2.2then 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).
Disable search option for resolv.conf
centos;resolv.conf