How to try next nameserver when the first one replies "No such name"?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to try next nameserver when the first one replies "No such name"?
I'm trying to resolve names that only the second nameserver in /etc/resolv.conf knows about. The first nameserver is a public one and the second is of my company, reacheable through a VPN. My company is using internally two domain names: one that doesn't exist in Internet and another one that somebody has recently registered.
When I ask for a name of the domain that doesn't exist in Internet, the first nameserver replies "Server Failure" and the resolver system tries the second nameserver which knows the name, so it works. The problem is when I ask for a name of the domain that now exists in Internet: the first nameserver replies "No such name" and the resolver system stops and doesn't ask the second nameserver.
I cannot change the order of the nameservers for two reasons: the VPN with my company is not always up so the second nameserver is not always reachable, and also I don't want to ask my company nameserver about sites I visit in Internet in my non-professional life.
Does somebody know how to configure the resolver system so it asks the second nameserver when the first one replies "No such name"?
I think that the main problem is to use valid domain internally. It would be better to use something.lan (and i suggest you so).
The only way to solve your problem now is to set up a nameserver locally. Wich will forward to the right nameserver the queries.
I think that the main problem is to use valid domain internally. It would be better to use something.lan (and i suggest you so).
The only way to solve your problem now is to set up a nameserver locally. Wich will forward to the right nameserver the queries.
That's exactly what I told to the management when they decided to use names for the internal servers that could be used in Internet, which finally has happened. But you known, for the managers I'm just an IT guy that say silly and incomprehensible things... Now, the option of changing the internal domains is very complicated, as we have about 500 servers and that's a lot of work and a probable source of many problems.
Meanwhile, your solution is good, thank you for the idea, but we'd have to setup a DNS server inside every company laptop, which is also not an easy task, but is easier than changing the internal domains.
I'll do that if there's no other options, but my questions is still open: is there a way to change the resolver system's default behaviour of not asking the next nameservers when the first one replies "No such name"? Maybe there's a way and this way could be even easier to implement in all laptops.
That's exactly what I told to the management when they decided to use names for the internal servers that could be used in Internet, which finally has happened. But you known, for the managers I'm just an IT guy that say silly and incomprehensible things... Now, the option of changing the internal domains is very complicated, as we have about 500 servers and that's a lot of work and a probable source of many problems.
Meanwhile, your solution is good, thank you for the idea, but we'd have to setup a DNS server inside every company laptop, which is also not an easy task, but is easier than changing the internal domains.
Maybe you can start the migration right now. You can make a new ".lan" domain and use both while the migration isn't complete. It can be the easiest way and you can go on "migrating" for a long while.
Quote:
Originally Posted by melendro
I'll do that if there's no other options, but my questions is still open: is there a way to change the resolver system's default behaviour of not asking the next nameservers when the first one replies "No such name"? Maybe there's a way and this way could be even easier to implement in all laptops.
Sorry, I don't know an answer about that. I don't think is possible without rewriting resolver code.
Sorry, I don't know an answer about that. I don't think is possible without rewriting resolver code.
I was afraid you'd say that: there's no option, as it is hardcoded.
I'll study the two solutions (changing the internal domain name of all servers, or install named on all laptops). At first glance, first one seems more complicated but better (and forever), second one seems easier but it is an ugly workaround.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.