abh / geodns

DNS server with per-client targeted responses
Apache License 2.0
1.37k stars 191 forks source link

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

Open shirakun opened 2 years ago

shirakun commented 2 years ago

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 formyself se here stands for Special Edition

https://github.com/abh/geodns/issues/50

I found other similar questions in issues but no solution

How to distinguish between geo records and normal records?

gmmoura commented 2 years ago

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 commented 2 years ago

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

I want to:

matheswaran99 commented 1 year ago

@abh Is there any solution for this scenario?

ghost commented 1 year ago

@abh

Hello, I need this too.

lanceocc commented 4 months ago

@abh

Hello, I need this too.

shirakun commented 4 months ago

@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/