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
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
New contributor
add a comment |
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
New contributor
add a comment |
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
New contributor
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
dns-hosting
New contributor
New contributor
New contributor
asked yesterday
zenzenmannzenzenmann
1
1
New contributor
New contributor
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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.
add a comment |
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
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
edited yesterday
answered yesterday
HBruijnHBruijn
55.9k1190150
55.9k1190150
add a comment |
add a comment |
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
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
add a comment |
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
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
add a comment |
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
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
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
add a comment |
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
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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