Hosting my own DNS server for my domain, force IP resolution based off visitor's IP addressWildcard DNS and subdomainsLooking for smart DNS hostingIf I register a domain name as a name server what do I set it's name server to?Domain cname not resolving with dnsimple.comSetting different NS records as authoritative on authoritative DNSIs it possible to point an IP address to a domain name?Understanding domain registration and dns lookupMoving DNS to a new provider; their servers don't respond but they say it's OK?dns not resolving remote domain when local zone file existExternal DNS to manage Domain // Ways to test the own external DNS server

Rotate ASCII Art by 45 Degrees

Partial fraction expansion confusion

How to Prove P(a) → ∀x(P(x) ∨ ¬(x = a)) using Natural Deduction

How to travel to Japan while expressing milk?

How does a dynamic QR code work?

Is this draw by repetition?

How dangerous is XSS

In the UK, is it possible to get a referendum by a court decision?

How to install cross-compiler on Ubuntu 18.04?

How to enclose theorems and definition in rectangles?

How obscure is the use of 令 in 令和?

Where would I need my direct neural interface to be implanted?

Car headlights in a world without electricity

What exactly is ineptocracy?

Forgetting the musical notes while performing in concert

What do you call someone who asks many questions?

Could the museum Saturn V's be refitted for one more flight?

How badly should I try to prevent a user from XSSing themselves?

Why didn't Boeing produce its own regional jet?

Can compressed videos be decoded back to their uncompresed original format?

In Bayesian inference, why are some terms dropped from the posterior predictive?

If a warlock makes a Dancing Sword their pact weapon, is there a way to prevent it from disappearing if it's farther away for more than a minute?

Is there a hemisphere-neutral way of specifying a season?

Knowledge-based authentication using Domain-driven Design in C#



Hosting my own DNS server for my domain, force IP resolution based off visitor's IP address


Wildcard DNS and subdomainsLooking for smart DNS hostingIf I register a domain name as a name server what do I set it's name server to?Domain cname not resolving with dnsimple.comSetting different NS records as authoritative on authoritative DNSIs it possible to point an IP address to a domain name?Understanding domain registration and dns lookupMoving DNS to a new provider; their servers don't respond but they say it's OK?dns not resolving remote domain when local zone file existExternal DNS to manage Domain // Ways to test the own external DNS server













0















This is specifically for my domain, the users/visitors will not use my dns server at all. Is this even possible?



I need to setup a dns server that I can host my domain on, that when requested will choose an IP address for the user from criteria that I set on my server.



Ex: user from Canada requests A NAME record lookup on mydomain.com and it will return 10.0.0.20 and a user from the Netherlands performing the same lookup will return 10.0.0.21, ideally I would like to be able to take the requesting IP address (user) and run my own scripts/checks on it even down to accounting for the ASN of the requestee and giving a specific IP address. Is this possible with hosting my own DNS server?



I don't have much experience outside of using free or third party dns services.



This needs to be done at the DNS level and not through redirecting traffic using a reverse proxy.










share|improve this question







New contributor




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
























    0















    This is specifically for my domain, the users/visitors will not use my dns server at all. Is this even possible?



    I need to setup a dns server that I can host my domain on, that when requested will choose an IP address for the user from criteria that I set on my server.



    Ex: user from Canada requests A NAME record lookup on mydomain.com and it will return 10.0.0.20 and a user from the Netherlands performing the same lookup will return 10.0.0.21, ideally I would like to be able to take the requesting IP address (user) and run my own scripts/checks on it even down to accounting for the ASN of the requestee and giving a specific IP address. Is this possible with hosting my own DNS server?



    I don't have much experience outside of using free or third party dns services.



    This needs to be done at the DNS level and not through redirecting traffic using a reverse proxy.










    share|improve this question







    New contributor




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






















      0












      0








      0








      This is specifically for my domain, the users/visitors will not use my dns server at all. Is this even possible?



      I need to setup a dns server that I can host my domain on, that when requested will choose an IP address for the user from criteria that I set on my server.



      Ex: user from Canada requests A NAME record lookup on mydomain.com and it will return 10.0.0.20 and a user from the Netherlands performing the same lookup will return 10.0.0.21, ideally I would like to be able to take the requesting IP address (user) and run my own scripts/checks on it even down to accounting for the ASN of the requestee and giving a specific IP address. Is this possible with hosting my own DNS server?



      I don't have much experience outside of using free or third party dns services.



      This needs to be done at the DNS level and not through redirecting traffic using a reverse proxy.










      share|improve this question







      New contributor




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












      This is specifically for my domain, the users/visitors will not use my dns server at all. Is this even possible?



      I need to setup a dns server that I can host my domain on, that when requested will choose an IP address for the user from criteria that I set on my server.



      Ex: user from Canada requests A NAME record lookup on mydomain.com and it will return 10.0.0.20 and a user from the Netherlands performing the same lookup will return 10.0.0.21, ideally I would like to be able to take the requesting IP address (user) and run my own scripts/checks on it even down to accounting for the ASN of the requestee and giving a specific IP address. Is this possible with hosting my own DNS server?



      I don't have much experience outside of using free or third party dns services.



      This needs to be done at the DNS level and not through redirecting traffic using a reverse proxy.







      dns-hosting






      share|improve this question







      New contributor




      zenzenmann 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




      zenzenmann 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






      New contributor




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









      asked yesterday









      zenzenmannzenzenmann

      1




      1




      New contributor




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





      New contributor





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






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




















          2 Answers
          2






          active

          oldest

          votes


















          2














          The base functionality for returning different results based on the client IP-address is in jargon called split horizon DNS and offered by many dns servers.



          The specific use case of using a Geo IP library to return different records based on the location associated with a client ip-address is found in some DNS servers, for instance in PowerDNS the "Geo IP" back-end provides that out-of-the-box and in other commercial and open source DNS servers similar functionality is sometimes called "GEO DNS" or more descriptive terms like "global [DNS] load balancing" or "[global] traffic director" may be used.



          If you want to create your own scripts, off-hand I know that both DNSmasq and PowerDNS provide hooks for LUA scripts to create your own logic.






          share|improve this answer
































            0














            Yes, this is, at most basic, possible, depending on your DNS server software. The feature in Bind is called "views" and allows you to manage different resulting configurations to present based on who is asking. This is also called "split" DNS.



            The implementation varies based on your server. For official reference, see latest Bind docs. [1]



            Performing dynamic scripting in-line with DNS lookup is not a feature of Bind, or most DNS servers. If you can choose your destination based on subnets, this will work for you.



            1: https://ftp.isc.org/isc/bind9/cur/9.13/doc/arm/Bv9ARM.ch05.html#view_statement






            share|improve this answer

























            • Thank you! This is a good direction that I will investigate for my uses. If it helps, I had in my mind the idea of wrapping a custom script in something like python that takes the requestee's ip address and does lookups/blacklist checks and returning a predefined ip address depending on what my script dictates. I was able to do such with http using OpenRESTY/NGinx but my use now requires dns level checks.

              – zenzenmann
              yesterday












            • edited while you were commenting to clarify that scripting isn't a feature, to the best of my knowledge. :)

              – rjewell
              yesterday











            Your Answer








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



            );






            zenzenmann 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%2fserverfault.com%2fquestions%2f960887%2fhosting-my-own-dns-server-for-my-domain-force-ip-resolution-based-off-visitors%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









            2














            The base functionality for returning different results based on the client IP-address is in jargon called split horizon DNS and offered by many dns servers.



            The specific use case of using a Geo IP library to return different records based on the location associated with a client ip-address is found in some DNS servers, for instance in PowerDNS the "Geo IP" back-end provides that out-of-the-box and in other commercial and open source DNS servers similar functionality is sometimes called "GEO DNS" or more descriptive terms like "global [DNS] load balancing" or "[global] traffic director" may be used.



            If you want to create your own scripts, off-hand I know that both DNSmasq and PowerDNS provide hooks for LUA scripts to create your own logic.






            share|improve this answer





























              2














              The base functionality for returning different results based on the client IP-address is in jargon called split horizon DNS and offered by many dns servers.



              The specific use case of using a Geo IP library to return different records based on the location associated with a client ip-address is found in some DNS servers, for instance in PowerDNS the "Geo IP" back-end provides that out-of-the-box and in other commercial and open source DNS servers similar functionality is sometimes called "GEO DNS" or more descriptive terms like "global [DNS] load balancing" or "[global] traffic director" may be used.



              If you want to create your own scripts, off-hand I know that both DNSmasq and PowerDNS provide hooks for LUA scripts to create your own logic.






              share|improve this answer



























                2












                2








                2







                The base functionality for returning different results based on the client IP-address is in jargon called split horizon DNS and offered by many dns servers.



                The specific use case of using a Geo IP library to return different records based on the location associated with a client ip-address is found in some DNS servers, for instance in PowerDNS the "Geo IP" back-end provides that out-of-the-box and in other commercial and open source DNS servers similar functionality is sometimes called "GEO DNS" or more descriptive terms like "global [DNS] load balancing" or "[global] traffic director" may be used.



                If you want to create your own scripts, off-hand I know that both DNSmasq and PowerDNS provide hooks for LUA scripts to create your own logic.






                share|improve this answer















                The base functionality for returning different results based on the client IP-address is in jargon called split horizon DNS and offered by many dns servers.



                The specific use case of using a Geo IP library to return different records based on the location associated with a client ip-address is found in some DNS servers, for instance in PowerDNS the "Geo IP" back-end provides that out-of-the-box and in other commercial and open source DNS servers similar functionality is sometimes called "GEO DNS" or more descriptive terms like "global [DNS] load balancing" or "[global] traffic director" may be used.



                If you want to create your own scripts, off-hand I know that both DNSmasq and PowerDNS provide hooks for LUA scripts to create your own logic.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited yesterday

























                answered yesterday









                HBruijnHBruijn

                55.9k1190150




                55.9k1190150























                    0














                    Yes, this is, at most basic, possible, depending on your DNS server software. The feature in Bind is called "views" and allows you to manage different resulting configurations to present based on who is asking. This is also called "split" DNS.



                    The implementation varies based on your server. For official reference, see latest Bind docs. [1]



                    Performing dynamic scripting in-line with DNS lookup is not a feature of Bind, or most DNS servers. If you can choose your destination based on subnets, this will work for you.



                    1: https://ftp.isc.org/isc/bind9/cur/9.13/doc/arm/Bv9ARM.ch05.html#view_statement






                    share|improve this answer

























                    • Thank you! This is a good direction that I will investigate for my uses. If it helps, I had in my mind the idea of wrapping a custom script in something like python that takes the requestee's ip address and does lookups/blacklist checks and returning a predefined ip address depending on what my script dictates. I was able to do such with http using OpenRESTY/NGinx but my use now requires dns level checks.

                      – zenzenmann
                      yesterday












                    • edited while you were commenting to clarify that scripting isn't a feature, to the best of my knowledge. :)

                      – rjewell
                      yesterday















                    0














                    Yes, this is, at most basic, possible, depending on your DNS server software. The feature in Bind is called "views" and allows you to manage different resulting configurations to present based on who is asking. This is also called "split" DNS.



                    The implementation varies based on your server. For official reference, see latest Bind docs. [1]



                    Performing dynamic scripting in-line with DNS lookup is not a feature of Bind, or most DNS servers. If you can choose your destination based on subnets, this will work for you.



                    1: https://ftp.isc.org/isc/bind9/cur/9.13/doc/arm/Bv9ARM.ch05.html#view_statement






                    share|improve this answer

























                    • Thank you! This is a good direction that I will investigate for my uses. If it helps, I had in my mind the idea of wrapping a custom script in something like python that takes the requestee's ip address and does lookups/blacklist checks and returning a predefined ip address depending on what my script dictates. I was able to do such with http using OpenRESTY/NGinx but my use now requires dns level checks.

                      – zenzenmann
                      yesterday












                    • edited while you were commenting to clarify that scripting isn't a feature, to the best of my knowledge. :)

                      – rjewell
                      yesterday













                    0












                    0








                    0







                    Yes, this is, at most basic, possible, depending on your DNS server software. The feature in Bind is called "views" and allows you to manage different resulting configurations to present based on who is asking. This is also called "split" DNS.



                    The implementation varies based on your server. For official reference, see latest Bind docs. [1]



                    Performing dynamic scripting in-line with DNS lookup is not a feature of Bind, or most DNS servers. If you can choose your destination based on subnets, this will work for you.



                    1: https://ftp.isc.org/isc/bind9/cur/9.13/doc/arm/Bv9ARM.ch05.html#view_statement






                    share|improve this answer















                    Yes, this is, at most basic, possible, depending on your DNS server software. The feature in Bind is called "views" and allows you to manage different resulting configurations to present based on who is asking. This is also called "split" DNS.



                    The implementation varies based on your server. For official reference, see latest Bind docs. [1]



                    Performing dynamic scripting in-line with DNS lookup is not a feature of Bind, or most DNS servers. If you can choose your destination based on subnets, this will work for you.



                    1: https://ftp.isc.org/isc/bind9/cur/9.13/doc/arm/Bv9ARM.ch05.html#view_statement







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited yesterday

























                    answered yesterday









                    rjewellrjewell

                    23416




                    23416












                    • Thank you! This is a good direction that I will investigate for my uses. If it helps, I had in my mind the idea of wrapping a custom script in something like python that takes the requestee's ip address and does lookups/blacklist checks and returning a predefined ip address depending on what my script dictates. I was able to do such with http using OpenRESTY/NGinx but my use now requires dns level checks.

                      – zenzenmann
                      yesterday












                    • edited while you were commenting to clarify that scripting isn't a feature, to the best of my knowledge. :)

                      – rjewell
                      yesterday

















                    • Thank you! This is a good direction that I will investigate for my uses. If it helps, I had in my mind the idea of wrapping a custom script in something like python that takes the requestee's ip address and does lookups/blacklist checks and returning a predefined ip address depending on what my script dictates. I was able to do such with http using OpenRESTY/NGinx but my use now requires dns level checks.

                      – zenzenmann
                      yesterday












                    • edited while you were commenting to clarify that scripting isn't a feature, to the best of my knowledge. :)

                      – rjewell
                      yesterday
















                    Thank you! This is a good direction that I will investigate for my uses. If it helps, I had in my mind the idea of wrapping a custom script in something like python that takes the requestee's ip address and does lookups/blacklist checks and returning a predefined ip address depending on what my script dictates. I was able to do such with http using OpenRESTY/NGinx but my use now requires dns level checks.

                    – zenzenmann
                    yesterday






                    Thank you! This is a good direction that I will investigate for my uses. If it helps, I had in my mind the idea of wrapping a custom script in something like python that takes the requestee's ip address and does lookups/blacklist checks and returning a predefined ip address depending on what my script dictates. I was able to do such with http using OpenRESTY/NGinx but my use now requires dns level checks.

                    – zenzenmann
                    yesterday














                    edited while you were commenting to clarify that scripting isn't a feature, to the best of my knowledge. :)

                    – rjewell
                    yesterday





                    edited while you were commenting to clarify that scripting isn't a feature, to the best of my knowledge. :)

                    – rjewell
                    yesterday










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









                    draft saved

                    draft discarded


















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












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











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














                    Thanks for contributing an answer to Server Fault!


                    • 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%2fserverfault.com%2fquestions%2f960887%2fhosting-my-own-dns-server-for-my-domain-force-ip-resolution-based-off-visitors%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

                    Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

                    Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

                    What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company