geodns
geodns copied to clipboard
Simple Site Setup Help Needed
Greetings All,
I hope that you are doing well today.
Recently, I have been able to compile up and run (through the test) at:
https://github.com/abh/geodns
but am having a bit of problem with the configuration as I think that I am missing something in the way that GeoDNs works.
First let me ask the general question, ok.
I installed the MaxMind GeoIP.dat, GeoIPASNum.dat and GeoIPCity.dat files with no problem and just for clarification, I am assuming that the IP address of the DNS caller and the IP of the server are compared to see which server is geographically closer to which the DNS caller is returned the closest server IP.
Would that be correct in how you have set up GeoDNS?
For the second question, I have 2 servers (A & B) and a domain name registered at GoDaddy to which I point to server A.
What I want to do is to set up my general domain name: example.com such Server-A is ns1.example.com and Server-B is ns2.example.com both running GeoDNS. I need to add in the ip addresses of the ns1 & ns2 servers on GeoDNS since I am just pointing the GoDaddy domain name to Server-A.
Also, for now so that I can do some development on these servers as well, I want to set up my general website URL to be www.example.com which can be called by a user and they will be directed to the port 80 of either Server-A or Server-B depending upon their geographical location.
I am also setting up a database server on Server-A and Server-B so that I can use a URL name like db.example.com which will return either the database service on Server-A or Server-B depending upon where they are located.
Lastly, I will do the same thing with MX mail servers.
I do not know how to set this up, but your examples are starting to give me a little idea on it.
Can you please help me with this configuration or a simple configuration?
Anything that you could do would be greatly appreciated.
Thanks again, Lonnie
I installed the MaxMind GeoIP.dat, GeoIPASNum.dat and GeoIPCity.dat files with no problem and just for clarification, I am assuming that the IP address of the DNS caller and the IP of the server are compared to see which server is geographically closer to which the DNS caller is returned the closest server IP.
No (but yes).
- With GeoDNS from master, you need to manually specify which parts of the world receive which answers in the zonefile.
- With this pull request: https://github.com/abh/geodns/pull/72 you can use the
closest
flag, which selects the IP address result which is geographically closest to the client, without any further configuration. That, however, is not currently merged.
Your configuration example is a bit confusing. You need to delegate the zone (example.com
) to one (or much better more than one) server running GeoDNS. These must be the authoritative nameservers. They could be (but need not be and are best not) the same servers as your webserver. The location of the nameservers is irrelevant to the outcome.
Hello and Thanks for responding to my inquiry.
If I understand things correctly then GeoDNS is an authoritative DNS server and since these are initially test servers as well then perhaps I could look at getting Pull Request #72 set up and running to be able to test things out if you need someone to do that.
As for the setup that I am trying to do, its really pretty simple, but I just have no experience configure GeoDNS.
What I basically have is a domain name from GoDaddy and 2 physical machines which are currently located in California (EAST-COAST) USA.
For initial testing, I just want to set up GeoDNS on both of them with similar configurations so that they can act as ns1 and ns2 for the domain "skadoo.net".
For testing as well, until I get more servers set up on the WEST-COAST which should be soon which will then be followed by a couple of machines in Europe, I want to also set up identical web servers, email servers, and database servers (port 3306) on those 2 machines EAST-COAST machines but do not know how to set up the GeoDNS configuration for all of this.
Right now, I have the GoDaddy domain name pointing to one of the physical machines in California (EAST-COAST) and need to figure out a simple configuration so that I can just use the fail-over, and load balancing features of GeoDNS along with know how to set up the geographical location stuff and be able to test things out on the 2 EAST-COAST machines so that I will have an idea how to configure things to add in the servers on the WEST-COAST or perhaps other locations.
If someone could help to show me a simple configuration then that would be helpful as I do not completely understand how the country and continent zone file look ups work.
Any help that could be provided would be greatly appreciated.
Thanks, Lonnie
Have you looked at the example configurations at https://github.com/abh/geodns/tree/master/dns ?
Actually, I have looked at all of the examples in that directory, but it is not completely clear how some things are done.
https://github.com/abh/geodns/blob/master/dns/test.example.com.json
For example (above)
I am not clear on what this targeting statement does:
"targeting": "country continent @ regiongroup region ip asn",
I do understand the part:
"data" : { "": { "ns": { "ns1.example.net.": null, "ns2.example.net.": null }, "spf": [ { "spf": "v=spf1 ~all", "weight": 1000 } ], "mx": [ { "preference": 20, "mx": "mx2.example.net", "weight": 0 }, { "preference": 10, "mx": "mx.example.net.", "weight": 1 }
I'm trying to understand the format
Where are you assigning the IP numbers to ns1.example.net and ns2.example.net?
"europe": { "mx": [ { "mx": "mx-eu.example.net" }]},
Is the "europe" being returned by GeoDNS in the caller lookup?
"foo": {
"a": [ [ "192.168.1.2", 10 ], [ "192.168.1.3", 10 ], [ "192.168.1.4",
10 ] ], "aaaa": [ ["fd06:c1d3:e902::2", 10], ["fd06:c1d3:e902:202:a5ff:fecd:13a6:a", 10], ["fd06:c1d3:e902::4", 10] ], "txt": "this is foo" },
What kind of tag is the "foo", in this case? Is it being returned by GeoDNS or is it something like "foo.example.net"
"weight": {
"a": [ [ "192.168.1.2", 100 ], [ "192.168.1.3", 50 ], [
"192.168.1.4", 25 ] ], "txt": [ { "txt": "w1000", "weight": 1000 }, { "txt": "w1", "weight": 1 } ], "max_hosts": "1" },
Also the same type of question as above for "weight", etc....
"_sip._tcp": { "srv": [ { "port": 5060, "srv_weight": 100, "priority": 10, "target": "sipserver.example.com."}] },
I see that the "_sip._tcp" will allow for a port definition in the srv record.
Please forgive all of the confusion on this, and I am hoping that if I can see a few more configurations that it will all become clear on the configuration side of GeoDNS as I understand the DNS records but not how to add the additional records so that GeoDNS can make the decision.
In the main help file readme on the site:
I see this simple setup for MX records:
{ "serial": 1, "data": { "": { "ns": [ "ns.example.net", "ns2.example.net" ], "txt": "Example zone", "spf": [ { "spf": "v=spf1 ~all", "weight": 1 } ], "mx": { "mx": "mail.example.com", "preference": 10 } }, "mail": { "a": [ ["192.168.0.1", 100], ["192.168.10.1", 50] ] }, "mail.europe": { "a": [ ["192.168.255.1", 0] ] }, "smtp": { "alias": "mail" } } }
The questionable parts are where are the ns1 & ns2 IP's beign defined?
Does GeoDNS choose the "192.168.255.1" IP if the "var CountryContinent = map[string]string" returns "europe"?
I truly am sorry for all of these questions, but I think that I am missing the basic approach to how GeoDNS determines which country or region within a country to act upon and then to configure that in the json file.
I'll keep trying to understand the approach as I think that GeoDNS can do exactly what I need, its now just time to figure out how to properly configure it to work for my needs and also so that I can expand upon those configurations as the system grows.
Thanks again and sorry for the long post.
Maybe I need to study some more basic examples to get a better feel for things.
Cheers, Lonnie
On Fri, Apr 22, 2016 at 4:08 PM, Alex Bligh [email protected] wrote:
Have you looked at the example configurations at https://github.com/abh/geodns/tree/master/dns ?
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/abh/geodns/issues/93#issuecomment-213573297
Hello,
I was looking at the Zone Record on the github site and saw:
"ns": [ "ns.example.net", "ns2.example.net" ],
Is it possible to add in an "A" record for each of these as well as each name server will have an instance of GeoDNS as well and I need to define the IP's.
Also, not sure how the pull requests work, but it was mentioned:
"... With this pull request: #72 you can use the closest flag, which selects the IP address result which is geographically closest to the client, without any further configuration. That, however, is not currently merged....."
How do i go about getting a copy of this version even if it is still experimental?
@lonnietc - Have you figured this out yet.Looks like I am also having the same confusion.
"mail.europe": { "a": [ ["192.168.255.1", 0] ] },
Assuming the above return 192.168.255.1 for all users in Europe when querying mail.example.net
How would i go about adding an A record for mail.europe.example.net if i really wanted to for some reason?
In short, how does geodns differentiate the europe being a continent and not part of the intended resource record ?
Keeping the "closest": true makes things better and understandable, would be really great if the targeting part had a better explanation and a real life example like I want
example.com with 2 IP's resolve to the closest server for europe and asia and a random ip for the other continents.