Skip to content

How does an authoritative server resolve a domain name based on a specified IP segment? #1296

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

Open
ycgz2008 opened this issue Apr 13, 2025 · 19 comments

Comments

@ycgz2008
Copy link

1、How does an authoritative server resolve a domain name based on a specified IP segment?

2、In addition, how does Geo Country perform domain name resolution based on ASN?

@ShreyasZare
Copy link
Member

Thanks for asking.

1、How does an authoritative server resolve a domain name based on a specified IP segment?

If you wish to resolve a domain based on client's subnet then you need to use the Split Horizon DNS app in your zone.

2、In addition, how does Geo Country perform domain name resolution based on ASN?

It uses MaxMind database to find out the country and then answers based on it. The ASN database used by the app is just used to identify the client subnet for use with EDNS Client Subnet.

@ycgz2008
Copy link
Author

Thanks for asking.

1、How does an authoritative server resolve a domain name based on a specified IP segment?

If you wish to resolve a domain based on client's subnet then you need to use the Split Horizon DNS app in your zone.

2、In addition, how does Geo Country perform domain name resolution based on ASN?

It uses MaxMind database to find out the country and then answers based on it. The ASN database used by the app is just used to identify the client subnet for use with EDNS Client Subnet.

I haven't figured it out yet with the help of chatgpt. Can you write a tutorial on this?

@ShreyasZare
Copy link
Member

I haven't figured it out yet with the help of chatgpt. Can you write a tutorial on this?

Thanks for asking. You can check out the discussions here and here on this.

If you still have any queries, feel free to ask here.

@ycgz2008
Copy link
Author

ycgz2008 commented Apr 14, 2025

I haven't figured it out yet with the help of chatgpt. Can you write a tutorial on this?

Thanks for asking. You can check out the discussions here and here on this.

If you still have any queries, feel free to ask here.

I can't resolve Geo Country, is this wrong? Resolve IP address based on ASN

App Name: Geo Country
Class Path: GeoCountry.Address
Record Data:

{
  "AS4134": [
    "49.51.66.10"
  ],
  "AS4809": [
    "49.51.66.10"
  ],
  "AS4837": [
    "49.51.66.20"
  ],
  "AS9929": [
    "49.51.66.20"
  ],
  "AS9808": [
    "49.51.66.30"
  ],
  "AS58453": [
    "49.51.66.30"
  ],
  "default": [
    "49.51.66.40"
  ]
}

@ShreyasZare
Copy link
Member

I can't resolve Geo Country, is this wrong? Resolve IP address based on ASN

The Geo Country app uses ISO country codes (like IN, CN, etc) with the config so using ASN in its place will not work.

The Split Horizon app supports only CIDR network addresses only.

There is no support for ASN based config available yet.

@ycgz2008
Copy link
Author

I can't resolve Geo Country, is this wrong? Resolve IP address based on ASN

The Geo Country app uses ISO country codes (like IN, CN, etc) with the config so using ASN in its place will not work.

The Split Horizon app supports only CIDR network addresses only.

There is no support for ASN based config available yet.

Split Horizon CIDR adds too much text limit, prompt:
Error! error - URI Too Long
Can it be achieved in this way?

{
  "http://www.xx.com/CIDR.txt": [
    "10.1.1.1"
  ]
}

@ShreyasZare
Copy link
Member

I can't resolve Geo Country, is this wrong? Resolve IP address based on ASN

The Geo Country app uses ISO country codes (like IN, CN, etc) with the config so using ASN in its place will not work.
The Split Horizon app supports only CIDR network addresses only.
There is no support for ASN based config available yet.

Split Horizon CIDR adds too much text limit, prompt: Error! error - URI Too Long Can it be achieved in this way?

{
  "http://www.xx.com/CIDR.txt": [
    "10.1.1.1"
  ]
}

Is the above json config being used in the APP record data or in the app's main config?

In any case, putting in a file URL will not work. Its expected that you put in network address like in this format 192.168.0.0/24.

@ycgz2008
Copy link
Author

Is the above json config being used in the APP record data or in the app's main config?

In any case, putting in a file URL will not work. Its expected that you put in network address like in this format 192.168.0.0/24.

Split Horizon CIDR Input 2000 192.168.0.0/24 APP record data to save, prompt: Error! Error - URI is too long

@ShreyasZare
Copy link
Member

Split Horizon CIDR Input 2000 192.168.0.0/24 APP record data to save, prompt: Error! Error - URI is too long

Thanks for the feedback. Please share the complete error log for this event which you will find in the Logs > View Logs section on the DNS admin panel.

@ycgz2008
Copy link
Author

Can you add a plugin for ASN parsing configuration?

@ycgz2008 ycgz2008 reopened this Apr 25, 2025
@ShreyasZare
Copy link
Member

Can you add a plugin for ASN parsing configuration?

Yes, this can be added as a separate DNS app. But it will need you to buy MaxMind license.

@ycgz2008
Copy link
Author

ycgz2008 commented Apr 26, 2025

Can you add a plugin for ASN parsing configuration?

Yes, this can be added as a separate DNS app. But it will need you to buy MaxMind license.

MaxMind provides free GeoLite ASN files, can't I use them?
I hope you will add ASN configuration plugin in the future.

@ShreyasZare
Copy link
Member

Yes, this can be added as a separate DNS app. But it will need you to buy MaxMind license.

MaxMind provides free GeoLite ASN files, can't I use them? I hope you will add ASN configuration plugin in the future.

The free database that MaxMind provides contains only a small set of data and is useful only for testing. If you wish to use this in production then you will need to buy the full license so that you get the full database.

Yes, will get this app added in later release.

@ycgz2008
Copy link
Author

Yes, this can be added as a separate DNS app. But it will need you to buy MaxMind license.

MaxMind provides free GeoLite ASN files, can't I use them? I hope you will add ASN configuration plugin in the future.

The free database that MaxMind provides contains only a small set of data and is useful only for testing. If you wish to use this in production then you will need to buy the full license so that you get the full database.

Yes, will get this app added in later release.

Thumbs up to you and Technitium DNS Server, you guys are awesome

@ShreyasZare
Copy link
Member

Keeping the issue open so that I can post when the app is available.

@ShreyasZare ShreyasZare reopened this Apr 26, 2025
@ycgz2008
Copy link
Author

Can the ASN parsing plug-in consider calling ASN: CSV files? Maxmind provides GeoLite ASN: CSV Format files that can be edited, but .mmdb files cannot be edited. Can Technitium DNS Server call ASN: CSV instead of .mmdb?

@ShreyasZare
Copy link
Member

Can the ASN parsing plug-in consider calling ASN: CSV files? Maxmind provides GeoLite ASN: CSV Format files that can be edited, but .mmdb files cannot be edited. Can Technitium DNS Server call ASN: CSV instead of .mmdb?

The library that MaxMind provides support only mmdb format.

If you need this for only a small set of ASNs then you can just define them in the app's main config. There use the custom network option to put in ASN name and add the network addresses it contains. You can then use the name in main config with the APP record jjson config.

@ycgz2008
Copy link
Author

Can the ASN parsing plug-in consider calling ASN: CSV files? Maxmind provides GeoLite ASN: CSV Format files that can be edited, but .mmdb files cannot be edited. Can Technitium DNS Server call ASN: CSV instead of .mmdb?

The library that MaxMind provides support only mmdb format.

If you need this for only a small set of ASNs then you can just define them in the app's main config. There use the custom network option to put in ASN name and add the network addresses it contains. You can then use the name in main config with the APP record jjson config.

The Technitium API api/zones/records/delete-records endpoint returns 200 OK but does not actually delete the record, nor does it update existing records

@ShreyasZare
Copy link
Member

The Technitium API api/zones/records/delete-records endpoint returns 200 OK but does not actually delete the record, nor does it update existing records

Thanks for asking. The correct API path is /api/zones/records/delete. Please check the API Docs here.

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

2 participants