Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to correctly distinguish normal subrecords from country codes when subrecords are the same as country codes #130

Open
shirakun opened this issue Oct 23, 2021 · 6 comments

Comments

@shirakun
Copy link

Hi

I looked at this sample configuration and I had a question
https://github.com/abh/geodns/blob/main/dns/test.example.com.json

When I set up the following record for example.com

{
    "": {
        "a": [
            [
                "192.168.1.1",
                10
            ]
        ]
    },
    "my": {
        "a": [
            [
                "192.168.1.2",
                10
            ]
        ]
    },
    "se": {
        "a": [
            [
                "192.168.1.3",
                10
            ]
        ]
    }
}

Attempts to request records from Sweden for example.com will return 192.168.1.3
A request from Malaysia will return 192.168.1.2

But
my here stands for myself
se here stands for Special Edition

#50

I found other similar questions in issues
but no solution

How to distinguish between geo records and normal records?

@gmmoura
Copy link

gmmoura commented Nov 5, 2021

my here stands for myself se here stands for Special Edition

How so?

GeoDNS subzones are exactly this my and se, which are country codes used by Maxmind.
Are you trying to override it?

@shirakun
Copy link
Author

my here stands for myself se here stands for Special Edition

How so?

GeoDNS subzones are exactly this my and se, which are country codes used by Maxmind. Are you trying to override it?

I don't know how to describe this problem in English

I don't know if you can understand him if I describe him like this

I set 3 a records

  • abc.com -> 1.1.1.1
  • my.abc.com -> 1.1.1.2
  • se.abc.com -> 1.1.1.3

I want to:

  • All regions of the world abc.com -> 1.1.1.1
  • All regions of the world my.abc.com -> 1.1.1.2
  • All regions of the world se.abc.com -> 1.1.1.3

@matheswaran99
Copy link

@abh Is there any solution for this scenario?

@shirakun shirakun changed the title How to tell if a record is a geo record How to correctly distinguish normal subrecords from country codes when subrecords are the same as country codes Aug 10, 2022
@ghost
Copy link

ghost commented Oct 2, 2022

@abh

Hello, I need this too.

@lanceocc
Copy link

@abh

Hello, I need this too.

@shirakun
Copy link
Author

shirakun commented Mar 28, 2024

@abh

Hello, I need this too.

Hi
geodns doesn't seem to solve this problem,when looking at the readme you will find geodns all around the geo record function
I recommend knot dns
This is the alternative to geodns that I have found so far.
knot dns is easier to configure and supports geo record and doesn't have this issue

https://www.knot-dns.cz/
https://blog.apnic.net/2018/11/14/geoip-in-knot-dns-2-7/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants