Setting up a srv record with dnsmasq - do I need to use a FQDN?











up vote
1
down vote

favorite












I'm currently running a linux based/DIY router that provides a few additional services. I don't currently have a domain set up, and I'd like to set up a srv record for certain services hosted on the router itself. I'm using dnsmasq for internal DHCP and DNS. I do not have the domain option set but I can set an unused domain/subdomain for it



The router's internal ip is 192.168.1.1, and it has a hostname router that seems to resolve from the other PCs.



This is what the appropriate line in the dnsmasq.conf looks like



# A SRV record sending LDAP for the example.com domain to
# ldapserver.example.com port 389 (using domain=)
#domain=example.com
#srv-host=_ldap._tcp,ldapserver.example.com,389


The example given in the dnsmasq looks like so - can I use any arbitrary valid domain for the domain - and can I use the ip address or a plain hostname like router for the host?



Or do I need to set a domain that I know isn't in use and use that for the hostname?










share|improve this question


























    up vote
    1
    down vote

    favorite












    I'm currently running a linux based/DIY router that provides a few additional services. I don't currently have a domain set up, and I'd like to set up a srv record for certain services hosted on the router itself. I'm using dnsmasq for internal DHCP and DNS. I do not have the domain option set but I can set an unused domain/subdomain for it



    The router's internal ip is 192.168.1.1, and it has a hostname router that seems to resolve from the other PCs.



    This is what the appropriate line in the dnsmasq.conf looks like



    # A SRV record sending LDAP for the example.com domain to
    # ldapserver.example.com port 389 (using domain=)
    #domain=example.com
    #srv-host=_ldap._tcp,ldapserver.example.com,389


    The example given in the dnsmasq looks like so - can I use any arbitrary valid domain for the domain - and can I use the ip address or a plain hostname like router for the host?



    Or do I need to set a domain that I know isn't in use and use that for the hostname?










    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I'm currently running a linux based/DIY router that provides a few additional services. I don't currently have a domain set up, and I'd like to set up a srv record for certain services hosted on the router itself. I'm using dnsmasq for internal DHCP and DNS. I do not have the domain option set but I can set an unused domain/subdomain for it



      The router's internal ip is 192.168.1.1, and it has a hostname router that seems to resolve from the other PCs.



      This is what the appropriate line in the dnsmasq.conf looks like



      # A SRV record sending LDAP for the example.com domain to
      # ldapserver.example.com port 389 (using domain=)
      #domain=example.com
      #srv-host=_ldap._tcp,ldapserver.example.com,389


      The example given in the dnsmasq looks like so - can I use any arbitrary valid domain for the domain - and can I use the ip address or a plain hostname like router for the host?



      Or do I need to set a domain that I know isn't in use and use that for the hostname?










      share|improve this question













      I'm currently running a linux based/DIY router that provides a few additional services. I don't currently have a domain set up, and I'd like to set up a srv record for certain services hosted on the router itself. I'm using dnsmasq for internal DHCP and DNS. I do not have the domain option set but I can set an unused domain/subdomain for it



      The router's internal ip is 192.168.1.1, and it has a hostname router that seems to resolve from the other PCs.



      This is what the appropriate line in the dnsmasq.conf looks like



      # A SRV record sending LDAP for the example.com domain to
      # ldapserver.example.com port 389 (using domain=)
      #domain=example.com
      #srv-host=_ldap._tcp,ldapserver.example.com,389


      The example given in the dnsmasq looks like so - can I use any arbitrary valid domain for the domain - and can I use the ip address or a plain hostname like router for the host?



      Or do I need to set a domain that I know isn't in use and use that for the hostname?







      dns dnsmasq






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 15 at 21:10









      Journeyman Geek

      111k43216363




      111k43216363






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Yes, you can use any valid domain for the domain.



          Requesting a domain in your browser (or elsewhere) will first search your hosts file for fitting domains, then escalate that request to its registered DNS server (most likely your router) which will first parse it's own DNS entries (which is essentially too a hosts file). If your router does not find the correct entry it will escalate it to its own registered DNS server.



          So to do that in your own network the easiest solution is to add an DNS record for this specific domain in your router and if your router has it add the same domain to it's DNS-Rebind-Protection to prevent any DNS requests for this domain to leave your local network.



          You could for example even use external IP addresses like 8.8.8.8 as host name, but you'd have to reroute that request via Iptables or similar to prevent it from being routed straight to Google.



          Fair warning: You won't be able to access the (real) domains/Ipaddresses if you remap them on your router.






          share|improve this answer























          • Which is fine - I can just use a subdomain on a domain I own just for SRV records of this sort, and it's purely for use inside my home lan
            – Journeyman Geek
            Nov 16 at 12:14











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          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
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375808%2fsetting-up-a-srv-record-with-dnsmasq-do-i-need-to-use-a-fqdn%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













          Yes, you can use any valid domain for the domain.



          Requesting a domain in your browser (or elsewhere) will first search your hosts file for fitting domains, then escalate that request to its registered DNS server (most likely your router) which will first parse it's own DNS entries (which is essentially too a hosts file). If your router does not find the correct entry it will escalate it to its own registered DNS server.



          So to do that in your own network the easiest solution is to add an DNS record for this specific domain in your router and if your router has it add the same domain to it's DNS-Rebind-Protection to prevent any DNS requests for this domain to leave your local network.



          You could for example even use external IP addresses like 8.8.8.8 as host name, but you'd have to reroute that request via Iptables or similar to prevent it from being routed straight to Google.



          Fair warning: You won't be able to access the (real) domains/Ipaddresses if you remap them on your router.






          share|improve this answer























          • Which is fine - I can just use a subdomain on a domain I own just for SRV records of this sort, and it's purely for use inside my home lan
            – Journeyman Geek
            Nov 16 at 12:14















          up vote
          0
          down vote













          Yes, you can use any valid domain for the domain.



          Requesting a domain in your browser (or elsewhere) will first search your hosts file for fitting domains, then escalate that request to its registered DNS server (most likely your router) which will first parse it's own DNS entries (which is essentially too a hosts file). If your router does not find the correct entry it will escalate it to its own registered DNS server.



          So to do that in your own network the easiest solution is to add an DNS record for this specific domain in your router and if your router has it add the same domain to it's DNS-Rebind-Protection to prevent any DNS requests for this domain to leave your local network.



          You could for example even use external IP addresses like 8.8.8.8 as host name, but you'd have to reroute that request via Iptables or similar to prevent it from being routed straight to Google.



          Fair warning: You won't be able to access the (real) domains/Ipaddresses if you remap them on your router.






          share|improve this answer























          • Which is fine - I can just use a subdomain on a domain I own just for SRV records of this sort, and it's purely for use inside my home lan
            – Journeyman Geek
            Nov 16 at 12:14













          up vote
          0
          down vote










          up vote
          0
          down vote









          Yes, you can use any valid domain for the domain.



          Requesting a domain in your browser (or elsewhere) will first search your hosts file for fitting domains, then escalate that request to its registered DNS server (most likely your router) which will first parse it's own DNS entries (which is essentially too a hosts file). If your router does not find the correct entry it will escalate it to its own registered DNS server.



          So to do that in your own network the easiest solution is to add an DNS record for this specific domain in your router and if your router has it add the same domain to it's DNS-Rebind-Protection to prevent any DNS requests for this domain to leave your local network.



          You could for example even use external IP addresses like 8.8.8.8 as host name, but you'd have to reroute that request via Iptables or similar to prevent it from being routed straight to Google.



          Fair warning: You won't be able to access the (real) domains/Ipaddresses if you remap them on your router.






          share|improve this answer














          Yes, you can use any valid domain for the domain.



          Requesting a domain in your browser (or elsewhere) will first search your hosts file for fitting domains, then escalate that request to its registered DNS server (most likely your router) which will first parse it's own DNS entries (which is essentially too a hosts file). If your router does not find the correct entry it will escalate it to its own registered DNS server.



          So to do that in your own network the easiest solution is to add an DNS record for this specific domain in your router and if your router has it add the same domain to it's DNS-Rebind-Protection to prevent any DNS requests for this domain to leave your local network.



          You could for example even use external IP addresses like 8.8.8.8 as host name, but you'd have to reroute that request via Iptables or similar to prevent it from being routed straight to Google.



          Fair warning: You won't be able to access the (real) domains/Ipaddresses if you remap them on your router.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 15 at 22:07

























          answered Nov 15 at 21:25









          Nordlys Jeger

          707216




          707216












          • Which is fine - I can just use a subdomain on a domain I own just for SRV records of this sort, and it's purely for use inside my home lan
            – Journeyman Geek
            Nov 16 at 12:14


















          • Which is fine - I can just use a subdomain on a domain I own just for SRV records of this sort, and it's purely for use inside my home lan
            – Journeyman Geek
            Nov 16 at 12:14
















          Which is fine - I can just use a subdomain on a domain I own just for SRV records of this sort, and it's purely for use inside my home lan
          – Journeyman Geek
          Nov 16 at 12:14




          Which is fine - I can just use a subdomain on a domain I own just for SRV records of this sort, and it's purely for use inside my home lan
          – Journeyman Geek
          Nov 16 at 12:14


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375808%2fsetting-up-a-srv-record-with-dnsmasq-do-i-need-to-use-a-fqdn%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

          QoS: MAC-Priority for clients behind a repeater

          Ивакино (Тотемский район)

          Can't locate Autom4te/ChannelDefs.pm in @INC (when it definitely is there)