Client can't connect to a DNS server (NXDOMAIN)











up vote
0
down vote

favorite












I'm an IT student working in VirtualBox. I managed to set up a DNS server that seems to work:



Server: 127.0.0.1
Address: 127.0.0.1#53

Name: srv-01.lab.loc
Address: 192.168.1.1


Now I need to check if a client machine can connect to it. I added this server to resolv.conf, but when I try to nslookup it, what I'm getting is this:



Server: 192.168.1.1
Address: 192.168.1.1#53

** server can't find srv-01: NXDOMAIN


How should I fix this? Or am I doing it all wrong and you have to do something else to test the server from a client machine?



EDIT:



When I run "nslookup 192.168.1.1" on my client machine, instead of "srv-01.lab.loc" what is shows is this:



1.1.168.192.in-addr.arpa    name = router.asus.com.


And trying to nslookup "router.asus.com" gives me this:



Server: 192.168.1.1
Address: 192.168.1.1#53

Name: router.asus.com
Address: 192.168.1.1


What do I do to make it recognize "srv-01.lab.loc" as the name of the server instead of "router.asus.com"?










share|improve this question









New contributor




Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • based on your previous question about dhcp, I thought your client machines would get the dns server automatically. Therefore you shouldn't need to do anything. Show us your exact nslookup command, used on your client machine.
    – Doug Smythies
    Dec 11 at 22:44










  • By the way, your client is connecting to your DNS server just fine, it is the lookup itself that is failing.
    – Doug Smythies
    Dec 11 at 22:51










  • I'm doing this for a university assignment - I have to set up a DNS server manually and test if a client can connect to it, but it wasn't specified how exactly I should test that last part, so I'm at a bit of a loss (since I have almost no experience with Ubuntu). DHCP was a different assignment. Here's the nslookup command: i.imgur.com/uOO9nlI.png
    – Sophia
    Dec 11 at 23:01










  • My best guess is that your "search" auto appending part is not setup correctly. So force it manually. Do: nslookup srv-01.lab.loc and see what you get. You need to take a step back and learn how to copy and paste directly into your question, so that we don't need to look at screenshots. One way would be to install SSH server on your virtual box computer and connect to it from your main computer, perhaps with PuTTY, Then copy and paste from your PuTTY ssh session.
    – Doug Smythies
    Dec 11 at 23:13










  • Thank you for the reply, I will try to figure out the way to do it. I get the same thing when I do nslookup srv-01.lab.loc. However I found out that, when I nslookup the actual IP from the client, it shows the name of the server as "router.asus.com": imgur.com/8x77VOk , when on my actual computer it's "srv-01.lab.loc": imgur.com/a/2PLlstc Why could that be?
    – Sophia
    Dec 11 at 23:49















up vote
0
down vote

favorite












I'm an IT student working in VirtualBox. I managed to set up a DNS server that seems to work:



Server: 127.0.0.1
Address: 127.0.0.1#53

Name: srv-01.lab.loc
Address: 192.168.1.1


Now I need to check if a client machine can connect to it. I added this server to resolv.conf, but when I try to nslookup it, what I'm getting is this:



Server: 192.168.1.1
Address: 192.168.1.1#53

** server can't find srv-01: NXDOMAIN


How should I fix this? Or am I doing it all wrong and you have to do something else to test the server from a client machine?



EDIT:



When I run "nslookup 192.168.1.1" on my client machine, instead of "srv-01.lab.loc" what is shows is this:



1.1.168.192.in-addr.arpa    name = router.asus.com.


And trying to nslookup "router.asus.com" gives me this:



Server: 192.168.1.1
Address: 192.168.1.1#53

Name: router.asus.com
Address: 192.168.1.1


What do I do to make it recognize "srv-01.lab.loc" as the name of the server instead of "router.asus.com"?










share|improve this question









New contributor




Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • based on your previous question about dhcp, I thought your client machines would get the dns server automatically. Therefore you shouldn't need to do anything. Show us your exact nslookup command, used on your client machine.
    – Doug Smythies
    Dec 11 at 22:44










  • By the way, your client is connecting to your DNS server just fine, it is the lookup itself that is failing.
    – Doug Smythies
    Dec 11 at 22:51










  • I'm doing this for a university assignment - I have to set up a DNS server manually and test if a client can connect to it, but it wasn't specified how exactly I should test that last part, so I'm at a bit of a loss (since I have almost no experience with Ubuntu). DHCP was a different assignment. Here's the nslookup command: i.imgur.com/uOO9nlI.png
    – Sophia
    Dec 11 at 23:01










  • My best guess is that your "search" auto appending part is not setup correctly. So force it manually. Do: nslookup srv-01.lab.loc and see what you get. You need to take a step back and learn how to copy and paste directly into your question, so that we don't need to look at screenshots. One way would be to install SSH server on your virtual box computer and connect to it from your main computer, perhaps with PuTTY, Then copy and paste from your PuTTY ssh session.
    – Doug Smythies
    Dec 11 at 23:13










  • Thank you for the reply, I will try to figure out the way to do it. I get the same thing when I do nslookup srv-01.lab.loc. However I found out that, when I nslookup the actual IP from the client, it shows the name of the server as "router.asus.com": imgur.com/8x77VOk , when on my actual computer it's "srv-01.lab.loc": imgur.com/a/2PLlstc Why could that be?
    – Sophia
    Dec 11 at 23:49













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm an IT student working in VirtualBox. I managed to set up a DNS server that seems to work:



Server: 127.0.0.1
Address: 127.0.0.1#53

Name: srv-01.lab.loc
Address: 192.168.1.1


Now I need to check if a client machine can connect to it. I added this server to resolv.conf, but when I try to nslookup it, what I'm getting is this:



Server: 192.168.1.1
Address: 192.168.1.1#53

** server can't find srv-01: NXDOMAIN


How should I fix this? Or am I doing it all wrong and you have to do something else to test the server from a client machine?



EDIT:



When I run "nslookup 192.168.1.1" on my client machine, instead of "srv-01.lab.loc" what is shows is this:



1.1.168.192.in-addr.arpa    name = router.asus.com.


And trying to nslookup "router.asus.com" gives me this:



Server: 192.168.1.1
Address: 192.168.1.1#53

Name: router.asus.com
Address: 192.168.1.1


What do I do to make it recognize "srv-01.lab.loc" as the name of the server instead of "router.asus.com"?










share|improve this question









New contributor




Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I'm an IT student working in VirtualBox. I managed to set up a DNS server that seems to work:



Server: 127.0.0.1
Address: 127.0.0.1#53

Name: srv-01.lab.loc
Address: 192.168.1.1


Now I need to check if a client machine can connect to it. I added this server to resolv.conf, but when I try to nslookup it, what I'm getting is this:



Server: 192.168.1.1
Address: 192.168.1.1#53

** server can't find srv-01: NXDOMAIN


How should I fix this? Or am I doing it all wrong and you have to do something else to test the server from a client machine?



EDIT:



When I run "nslookup 192.168.1.1" on my client machine, instead of "srv-01.lab.loc" what is shows is this:



1.1.168.192.in-addr.arpa    name = router.asus.com.


And trying to nslookup "router.asus.com" gives me this:



Server: 192.168.1.1
Address: 192.168.1.1#53

Name: router.asus.com
Address: 192.168.1.1


What do I do to make it recognize "srv-01.lab.loc" as the name of the server instead of "router.asus.com"?







networking server virtualbox dns






share|improve this question









New contributor




Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Dec 11 at 23:57





















New contributor




Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Dec 11 at 22:35









Sophia

83




83




New contributor




Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • based on your previous question about dhcp, I thought your client machines would get the dns server automatically. Therefore you shouldn't need to do anything. Show us your exact nslookup command, used on your client machine.
    – Doug Smythies
    Dec 11 at 22:44










  • By the way, your client is connecting to your DNS server just fine, it is the lookup itself that is failing.
    – Doug Smythies
    Dec 11 at 22:51










  • I'm doing this for a university assignment - I have to set up a DNS server manually and test if a client can connect to it, but it wasn't specified how exactly I should test that last part, so I'm at a bit of a loss (since I have almost no experience with Ubuntu). DHCP was a different assignment. Here's the nslookup command: i.imgur.com/uOO9nlI.png
    – Sophia
    Dec 11 at 23:01










  • My best guess is that your "search" auto appending part is not setup correctly. So force it manually. Do: nslookup srv-01.lab.loc and see what you get. You need to take a step back and learn how to copy and paste directly into your question, so that we don't need to look at screenshots. One way would be to install SSH server on your virtual box computer and connect to it from your main computer, perhaps with PuTTY, Then copy and paste from your PuTTY ssh session.
    – Doug Smythies
    Dec 11 at 23:13










  • Thank you for the reply, I will try to figure out the way to do it. I get the same thing when I do nslookup srv-01.lab.loc. However I found out that, when I nslookup the actual IP from the client, it shows the name of the server as "router.asus.com": imgur.com/8x77VOk , when on my actual computer it's "srv-01.lab.loc": imgur.com/a/2PLlstc Why could that be?
    – Sophia
    Dec 11 at 23:49


















  • based on your previous question about dhcp, I thought your client machines would get the dns server automatically. Therefore you shouldn't need to do anything. Show us your exact nslookup command, used on your client machine.
    – Doug Smythies
    Dec 11 at 22:44










  • By the way, your client is connecting to your DNS server just fine, it is the lookup itself that is failing.
    – Doug Smythies
    Dec 11 at 22:51










  • I'm doing this for a university assignment - I have to set up a DNS server manually and test if a client can connect to it, but it wasn't specified how exactly I should test that last part, so I'm at a bit of a loss (since I have almost no experience with Ubuntu). DHCP was a different assignment. Here's the nslookup command: i.imgur.com/uOO9nlI.png
    – Sophia
    Dec 11 at 23:01










  • My best guess is that your "search" auto appending part is not setup correctly. So force it manually. Do: nslookup srv-01.lab.loc and see what you get. You need to take a step back and learn how to copy and paste directly into your question, so that we don't need to look at screenshots. One way would be to install SSH server on your virtual box computer and connect to it from your main computer, perhaps with PuTTY, Then copy and paste from your PuTTY ssh session.
    – Doug Smythies
    Dec 11 at 23:13










  • Thank you for the reply, I will try to figure out the way to do it. I get the same thing when I do nslookup srv-01.lab.loc. However I found out that, when I nslookup the actual IP from the client, it shows the name of the server as "router.asus.com": imgur.com/8x77VOk , when on my actual computer it's "srv-01.lab.loc": imgur.com/a/2PLlstc Why could that be?
    – Sophia
    Dec 11 at 23:49
















based on your previous question about dhcp, I thought your client machines would get the dns server automatically. Therefore you shouldn't need to do anything. Show us your exact nslookup command, used on your client machine.
– Doug Smythies
Dec 11 at 22:44




based on your previous question about dhcp, I thought your client machines would get the dns server automatically. Therefore you shouldn't need to do anything. Show us your exact nslookup command, used on your client machine.
– Doug Smythies
Dec 11 at 22:44












By the way, your client is connecting to your DNS server just fine, it is the lookup itself that is failing.
– Doug Smythies
Dec 11 at 22:51




By the way, your client is connecting to your DNS server just fine, it is the lookup itself that is failing.
– Doug Smythies
Dec 11 at 22:51












I'm doing this for a university assignment - I have to set up a DNS server manually and test if a client can connect to it, but it wasn't specified how exactly I should test that last part, so I'm at a bit of a loss (since I have almost no experience with Ubuntu). DHCP was a different assignment. Here's the nslookup command: i.imgur.com/uOO9nlI.png
– Sophia
Dec 11 at 23:01




I'm doing this for a university assignment - I have to set up a DNS server manually and test if a client can connect to it, but it wasn't specified how exactly I should test that last part, so I'm at a bit of a loss (since I have almost no experience with Ubuntu). DHCP was a different assignment. Here's the nslookup command: i.imgur.com/uOO9nlI.png
– Sophia
Dec 11 at 23:01












My best guess is that your "search" auto appending part is not setup correctly. So force it manually. Do: nslookup srv-01.lab.loc and see what you get. You need to take a step back and learn how to copy and paste directly into your question, so that we don't need to look at screenshots. One way would be to install SSH server on your virtual box computer and connect to it from your main computer, perhaps with PuTTY, Then copy and paste from your PuTTY ssh session.
– Doug Smythies
Dec 11 at 23:13




My best guess is that your "search" auto appending part is not setup correctly. So force it manually. Do: nslookup srv-01.lab.loc and see what you get. You need to take a step back and learn how to copy and paste directly into your question, so that we don't need to look at screenshots. One way would be to install SSH server on your virtual box computer and connect to it from your main computer, perhaps with PuTTY, Then copy and paste from your PuTTY ssh session.
– Doug Smythies
Dec 11 at 23:13












Thank you for the reply, I will try to figure out the way to do it. I get the same thing when I do nslookup srv-01.lab.loc. However I found out that, when I nslookup the actual IP from the client, it shows the name of the server as "router.asus.com": imgur.com/8x77VOk , when on my actual computer it's "srv-01.lab.loc": imgur.com/a/2PLlstc Why could that be?
– Sophia
Dec 11 at 23:49




Thank you for the reply, I will try to figure out the way to do it. I get the same thing when I do nslookup srv-01.lab.loc. However I found out that, when I nslookup the actual IP from the client, it shows the name of the server as "router.asus.com": imgur.com/8x77VOk , when on my actual computer it's "srv-01.lab.loc": imgur.com/a/2PLlstc Why could that be?
– Sophia
Dec 11 at 23:49










1 Answer
1






active

oldest

votes

















up vote
0
down vote













I realized that the root of my problem was apparently the fact that as an IP address for my DNS server I was using 192.168.1.1, which is a router IP, so my client machine got confused. When I instead gave my DNS server an IP of 192.168.1.2, everything worked perfectly.






share|improve this answer








New contributor




Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    Sophia is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1100160%2fclient-cant-connect-to-a-dns-server-nxdomain%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    I realized that the root of my problem was apparently the fact that as an IP address for my DNS server I was using 192.168.1.1, which is a router IP, so my client machine got confused. When I instead gave my DNS server an IP of 192.168.1.2, everything worked perfectly.






    share|improve this answer








    New contributor




    Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      up vote
      0
      down vote













      I realized that the root of my problem was apparently the fact that as an IP address for my DNS server I was using 192.168.1.1, which is a router IP, so my client machine got confused. When I instead gave my DNS server an IP of 192.168.1.2, everything worked perfectly.






      share|improve this answer








      New contributor




      Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















        up vote
        0
        down vote










        up vote
        0
        down vote









        I realized that the root of my problem was apparently the fact that as an IP address for my DNS server I was using 192.168.1.1, which is a router IP, so my client machine got confused. When I instead gave my DNS server an IP of 192.168.1.2, everything worked perfectly.






        share|improve this answer








        New contributor




        Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        I realized that the root of my problem was apparently the fact that as an IP address for my DNS server I was using 192.168.1.1, which is a router IP, so my client machine got confused. When I instead gave my DNS server an IP of 192.168.1.2, everything worked perfectly.







        share|improve this answer








        New contributor




        Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered Dec 12 at 0:14









        Sophia

        83




        83




        New contributor




        Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Sophia is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






















            Sophia is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            Sophia is a new contributor. Be nice, and check out our Code of Conduct.













            Sophia is a new contributor. Be nice, and check out our Code of Conduct.












            Sophia is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1100160%2fclient-cant-connect-to-a-dns-server-nxdomain%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            數位音樂下載

            When can things happen in Etherscan, such as the picture below?

            格利澤436b