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

Geo dns not work #141

Open
sadeghpro opened this issue Jan 18, 2024 · 0 comments
Open

Geo dns not work #141

sadeghpro opened this issue Jan 18, 2024 · 0 comments

Comments

@sadeghpro
Copy link

sadeghpro commented Jan 18, 2024

Hi every one, I have a file named s-m.app.json that contains this

{
    "serial":1394372421,
    "ttl":    120,
    "targeting": "country continent @ regiongroup region asn",
    "data":{
        "":{
            "ns": [ "ns1.s-m.app", "ns2.s-m.app" ],
            "a":[
                [
                   "157.90.127.83",
                   "100"
                ]
            ]
        },
        "test":{
            "ns": [ "ns1.s-m.app", "ns2.s-m.app" ],
            "a":[
                [
                   "157.90.127.83",
                   "100"
                ]
            ]
        },
        "test.asia":{
            "ns": [ "ns1.s-m.app", "ns2.s-m.app" ],
            "a":[
                [
                   "185.53.143.66",
                   "100"
                ]
            ]
        }
    }
}

but when I ran below command from asia I don't get correct ip
➜ ~ dig -t a +short test.s-m.app
157.90.127.83
➜ ~ dig -t a +short test.asia.s-m.app
185.53.143.66

as you see it get test.asia record as subdomain.

I build geodns with this docker file

FROM golang:1.22rc1

RUN apt-get update \
 && apt-get install -y libgeoip-dev


RUN git clone https://github.com/abh/geodns.git /geodns
WORKDIR /geodns
RUN go build && ./geodns -h

CMD [ "./geodns", "-log" ]

and run it with this docker-compose.yml file

version: '3.3'
services:
  geodns:
    image: sadeghpro/geodns:1.0.1
    container_name: geodns
    restart: unless-stopped
    volumes:
      - ./dns:/geodns/dns
    ports:
      - "53:53/udp"
      - "53:53"
      - "8053:8053"

I tried asia.test with putting "version": 2 at top of file but nothing changed.

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

1 participant