Before pushing new configuration changes on our DNS servers, I like to test and verify on a 'test' server before applying the changes on our 'production' servers.

So this is my deck network config :

enter image description here

.57 is my 'test' server, .22 and .44 are our 'production' servers; is there a way to force my deck to force doing DNS query on .57 instead of .22 and .44?

... maybe --all-servers or --strict-order options? I'm not sure how to apply those to the NetworkManager dnsmasq subprocess...

++ EDIT ++

I forgot to mention that .57 is running locally via VirtualBox, so I need multiple DNS defined in order to respond (in case I forgot to start it or is not working)

  • ... I made all kind of tests with dnsmasq options, to no avail! Maybe my thinking of this is just flawed! – ionreflex Jun 12 '15 at 20:36

nslookup allows specifying dns server . you can use that to test queries, like so nslookup google.com ,replace with your desired server. Dig command offers same functionality. More info in man nslookup and man dig

  • That is totally accurate, but it doesn't help testing access through SSH or HTTPS... I'm starting to think my question isn't as thoroughly developed as it should! – ionreflex Jun 12 '15 at 16:09

Generally the primary server is used first. That's why it is called the primary server. So in your case '.57' is used which is what you want. Only if it does not respond the secondary server is contacted. If that one does not respond too the teriary server is contacted. If none of them responds you'll get an error about resolving.

And there's a 100% reliable solution to your problem too: In your networkmanager specify the '.57' server only, not the other ones, and then you'll know for sure that's the only one contacted.

  • I totally agree, but since I modify it constantly and have to restart it a lot, I guess dnsmasq keeps flagging it as unreliable compared to the other 2! And since .57 is running locally via VirtualBox - another thing I forgot to mention in my question! - I need other servers defined to respond to queries in case it's not started or plain broken – ionreflex Jun 12 '15 at 16:13
  • Why do you have dnsmasq any way? I know: it is standard on Ubuntu... But dnsmasq acts as a local DNS server itself, so now you've to make it to forward to one of your other DNS servers. What I recommend you to do is disabling dnsmasq. Edit the file: /etc/NetworkManager/NetworkManager.conf and add a # in front of the line that reads dns=dnsmasq then restart. Now go to the networkmanager select the ipv4 settings tab and there add the '.57' server as your DNS server. – wie5Ooma Jun 12 '15 at 19:22
  • You're telling me to only have .57 as my DNS server? If VirtualBox ain't working, I would loose DNS resolution all together... – ionreflex Jun 12 '15 at 20:07
  • Since your question was is there a way to force my deck to force doing DNS query on .57 instead of .22 and .44?', yes, I tell you how to use that particular server. If you loose DNS resolution then you'll at least what's wrong. Remember You should not do this in a production environment, but only on the test server. – wie5Ooma Jun 12 '15 at 20:50
  • After much consideration and thinking, I think my logic about this is just wrong : having a 'test' server alongside 'production' servers is not ideal, but you gave me some ideas. I think I'll disable nm-dnsmasq form my deck, install bind9 locally and define .22 and .44 as forwarders; that way I can test new entries locally before pushing them in production and if I loose DNS function all-together I'll know it right away... what do you think? – ionreflex Jun 15 '15 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.