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

                    Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

                    Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

                    Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020