Setting up a srv record with dnsmasq - do I need to use a FQDN?DD-WRT: DNSMasq expand-hosts not...

A starship is travelling at 0.9c and collides with a small rock. Will it leave a clean hole through, or will more happen?

Can a hotel cancel a confirmed reservation?

How can I play a serial killer in a party of good PCs?

How should I handle players who ignore the session zero agreement?

What's a good word to describe a public place that looks like it wouldn't be rough?

Flipping axis on a LogPlot

How to deal with an incendiary email that was recalled

How to make ice magic work from a scientific point of view?

What are the exceptions to Natural Selection?

Finding a logistic regression model which can achieve zero error on a training set training data for a binary classification problem with two features

use of 4/2 chord more compelling than root position?

Dilemma of explaining to interviewer that he is the reason for declining second interview

Absorbing damage with Planeswalker

What would the chemical name be for C13H8Cl3NO

Why exactly do action photographers need high fps burst cameras?

Play Zip, Zap, Zop

Why am I able to open Wireshark in macOS without root privileges?

What incentives do banks have to gather up loans into pools (backed by Ginnie Mae)and selling them?

Calculate the number of points of an elliptic curve in medium Weierstrass form over finite field

Can I make estimated tax payments instead of withholding from my paycheck?

Is boss over stepping boundary/micromanaging?

Am I a Rude Number?

Increment each digit in a number to form a new number

SET NOCOUNT Error in handling SQL call after upgrade



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


DD-WRT: DNSMasq expand-hosts not workingOpenWRT based gateway with dnsmasq and internal server with bindMinecraft servers - 1 external IP, 2 servers, 2 ports - avoid specifying port in game - SRV recordOSX running dnsmasq not always handling default dns querieshow to use use local nameservers with public domain?DD-WRT: dnsmasq headaches with static hostsWhat's wrong with my SRV record?Residential router interfering with SRV recordsEnable DNS Hostname resolution with OpenVPN and DNSMasqCan I configure dnsmasq to use /etc/hosts to resolve the target of a CNAME?













1















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



























    1















    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

























      1












      1








      1








      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 '18 at 21:10









      Journeyman GeekJourneyman Geek

      112k44217371




      112k44217371






















          2 Answers
          2






          active

          oldest

          votes


















          0














          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 '18 at 12:14



















          0














          After some testing - I discovered in my specific case, where the service is running on the same box that's running dnsmasq, setting a srv record by IP appears to be a better option.



          So, testing process was testing pinging the router by hostname and ip to ensure stuff resolved.



          I then tested two options



          srv-host=_aserv._tcp,hostname,1688 and srv-host=_aserv._tcp,192.168.1.1,1688 in dnsmasq



          I then tested them with nslookup -type=srv _aserv._tcp



          By IP



          Server:  router
          Address: 192.168.1.1

          _aserv._tcp SRV service location:
          priority = 0
          weight = 0
          port = 1688
          svr hostname = 192.168.1.1



          By Hostname



          C:Usersfaile_000Desktop>nslookup -type=srv _vlmcs._tcp
          Server: UnKnown
          Address: 192.168.1.1

          _aserv._tcp SRV service location:
          priority = 0
          weight = 0
          port = 1688
          svr hostname = router
          heckate_router AAAA IPv6 address = ::1
          heckate_router internet address = 127.0.0.1


          In this case, setting it by hostname causes it to resolve to itself. If I either explicitly set the hostname for the server, or if it was another server this might work.






          share|improve this answer























            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',
            autoActivateHeartbeat: false,
            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

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            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 '18 at 12:14
















            0














            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 '18 at 12:14














            0












            0








            0







            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 '18 at 22:07

























            answered Nov 15 '18 at 21:25









            Nordlys JegerNordlys Jeger

            781417




            781417













            • 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 '18 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 '18 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 '18 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 '18 at 12:14













            0














            After some testing - I discovered in my specific case, where the service is running on the same box that's running dnsmasq, setting a srv record by IP appears to be a better option.



            So, testing process was testing pinging the router by hostname and ip to ensure stuff resolved.



            I then tested two options



            srv-host=_aserv._tcp,hostname,1688 and srv-host=_aserv._tcp,192.168.1.1,1688 in dnsmasq



            I then tested them with nslookup -type=srv _aserv._tcp



            By IP



            Server:  router
            Address: 192.168.1.1

            _aserv._tcp SRV service location:
            priority = 0
            weight = 0
            port = 1688
            svr hostname = 192.168.1.1



            By Hostname



            C:Usersfaile_000Desktop>nslookup -type=srv _vlmcs._tcp
            Server: UnKnown
            Address: 192.168.1.1

            _aserv._tcp SRV service location:
            priority = 0
            weight = 0
            port = 1688
            svr hostname = router
            heckate_router AAAA IPv6 address = ::1
            heckate_router internet address = 127.0.0.1


            In this case, setting it by hostname causes it to resolve to itself. If I either explicitly set the hostname for the server, or if it was another server this might work.






            share|improve this answer




























              0














              After some testing - I discovered in my specific case, where the service is running on the same box that's running dnsmasq, setting a srv record by IP appears to be a better option.



              So, testing process was testing pinging the router by hostname and ip to ensure stuff resolved.



              I then tested two options



              srv-host=_aserv._tcp,hostname,1688 and srv-host=_aserv._tcp,192.168.1.1,1688 in dnsmasq



              I then tested them with nslookup -type=srv _aserv._tcp



              By IP



              Server:  router
              Address: 192.168.1.1

              _aserv._tcp SRV service location:
              priority = 0
              weight = 0
              port = 1688
              svr hostname = 192.168.1.1



              By Hostname



              C:Usersfaile_000Desktop>nslookup -type=srv _vlmcs._tcp
              Server: UnKnown
              Address: 192.168.1.1

              _aserv._tcp SRV service location:
              priority = 0
              weight = 0
              port = 1688
              svr hostname = router
              heckate_router AAAA IPv6 address = ::1
              heckate_router internet address = 127.0.0.1


              In this case, setting it by hostname causes it to resolve to itself. If I either explicitly set the hostname for the server, or if it was another server this might work.






              share|improve this answer


























                0












                0








                0







                After some testing - I discovered in my specific case, where the service is running on the same box that's running dnsmasq, setting a srv record by IP appears to be a better option.



                So, testing process was testing pinging the router by hostname and ip to ensure stuff resolved.



                I then tested two options



                srv-host=_aserv._tcp,hostname,1688 and srv-host=_aserv._tcp,192.168.1.1,1688 in dnsmasq



                I then tested them with nslookup -type=srv _aserv._tcp



                By IP



                Server:  router
                Address: 192.168.1.1

                _aserv._tcp SRV service location:
                priority = 0
                weight = 0
                port = 1688
                svr hostname = 192.168.1.1



                By Hostname



                C:Usersfaile_000Desktop>nslookup -type=srv _vlmcs._tcp
                Server: UnKnown
                Address: 192.168.1.1

                _aserv._tcp SRV service location:
                priority = 0
                weight = 0
                port = 1688
                svr hostname = router
                heckate_router AAAA IPv6 address = ::1
                heckate_router internet address = 127.0.0.1


                In this case, setting it by hostname causes it to resolve to itself. If I either explicitly set the hostname for the server, or if it was another server this might work.






                share|improve this answer













                After some testing - I discovered in my specific case, where the service is running on the same box that's running dnsmasq, setting a srv record by IP appears to be a better option.



                So, testing process was testing pinging the router by hostname and ip to ensure stuff resolved.



                I then tested two options



                srv-host=_aserv._tcp,hostname,1688 and srv-host=_aserv._tcp,192.168.1.1,1688 in dnsmasq



                I then tested them with nslookup -type=srv _aserv._tcp



                By IP



                Server:  router
                Address: 192.168.1.1

                _aserv._tcp SRV service location:
                priority = 0
                weight = 0
                port = 1688
                svr hostname = 192.168.1.1



                By Hostname



                C:Usersfaile_000Desktop>nslookup -type=srv _vlmcs._tcp
                Server: UnKnown
                Address: 192.168.1.1

                _aserv._tcp SRV service location:
                priority = 0
                weight = 0
                port = 1688
                svr hostname = router
                heckate_router AAAA IPv6 address = ::1
                heckate_router internet address = 127.0.0.1


                In this case, setting it by hostname causes it to resolve to itself. If I either explicitly set the hostname for the server, or if it was another server this might work.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 12 mins ago









                Journeyman GeekJourneyman Geek

                112k44217371




                112k44217371






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Super User!


                    • 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%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

                    Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

                    VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

                    Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...