TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
4.32k stars 422 forks source link

[New features request] Please allows adding conditional forwarder zone in batch. #319

Closed LittleGrocery closed 2 years ago

LittleGrocery commented 3 years ago

Please allows adding conditional forwarder zone in batch. Because of the network environment of my country. I need to add a list of domains that should query from my country domain name servers because it's much faster and I also need to query other domain name servers located in other areas which are not polluted so that I can access websites ​such as Youtube or Google etc.

​So I want to use unpolluted servers by default to access this kind of website and use the conditional forward function to access my country websites. But the list of my country websites is too much to add one by one so I make this request.

In the end, Wish you a good day!

ShreyasZare commented 3 years ago

Thanks for the post. Just having an option to add bulk domain names for creating conditional forwarder zones may not be useful since when you have to change the forwarder then you will have to do that manually for every zone.

I have a better idea to have a DNS App for bulk conditional forwarding. So, you will be able to edit the json config for the app in bulk. If you are not families with DNS apps then take a look at a few apps that are available and see how their config is done.

Let me know if such an app will be useful for your scenario.

LittleGrocery commented 3 years ago

Thanks for the post. Just having an option to add bulk domain names for creating conditional forwarder zones may not be useful since when you have to change the forwarder then you will have to do that manually for every zone.

I have a better idea to have a DNS App for bulk conditional forwarding. So, you will be able to edit the json config for the app in bulk. If you are not families with DNS apps then take a look at a few apps that are available and see how their config is done.

Let me know if such an app will be useful for your scenario.

I used to use unbound and dnscrypt-proxy to fulfilled my requirement. Now I use unbound and TechnitiumSoftware DnsServer to do it. Unbound can use for bulk conditional forwarding but I still want to use DnsServer to do all things and now it just lack those function so that I can use it to do all the job. I love functions and UI design of DnsServer especially the cool dashboard with many statistical data so I want to use it to do all the job.

ShreyasZare commented 3 years ago

I used to use unbound and dnscrypt-proxy to fulfilled my requirement. Now I use unbound and TechnitiumSoftware DnsServer to do it. Unbound can use for bulk conditional forwarding but I still want to use DnsServer to do all things and now it just lack those function so that I can use it to do all the job. I love functions and UI design of DnsServer especially the cool dashboard with many statistical data so I want to use it to do all the job.

Thanks for the compliments. I can try to add option for bulk adding the zones. So you can like add 10 domain names and it will create 10 separate zones. The problem would be to update them in bulk which is why I was thinking that having a DNS app will make it much easy to edit the config in bulk.

With app it becomes easy as it does not require to follow the zones pattern that the DNS server has implemented.

Will think on this for a while to see if I can get some better idea to solve this.

LittleGrocery commented 3 years ago

I used to use unbound and dnscrypt-proxy to fulfilled my requirement. Now I use unbound and TechnitiumSoftware DnsServer to do it. Unbound can use for bulk conditional forwarding but I still want to use DnsServer to do all things and now it just lack those function so that I can use it to do all the job. I love functions and UI design of DnsServer especially the cool dashboard with many statistical data so I want to use it to do all the job.

Thanks for the compliments. I can try to add option for bulk adding the zones. So you can like add 10 domain names and it will create 10 separate zones. The problem would be to update them in bulk which is why I was thinking that having a DNS app will make it much easy to edit the config in bulk.

With app it becomes easy as it does not require to follow the zones pattern that the DNS server has implemented.

Will think on this for a while to see if I can get some better idea to solve this.

Thank you very much. And the config file of unbound is like this: forward-zone: name: "0-100.com." forward-addr: 192.168.1.1 forward-addr: 119.29.29.29

forward-zone: name: "0-6.com." forward-addr: 192.168.1.1 forward-addr: 119.29.29.29

forward-zone: name: "0-gold.net." forward-addr: 192.168.1.1 forward-addr: 119.29.29.29 But these are just three of them so add 10 domain names in once still don't enough because I have nearly 70,000 domains need to be added. It is really impossible to add one by one.

ShreyasZare commented 3 years ago

Well, 70,000 domain names are too many to manage from the UI. While it is possible to create so many zones on the DNS server, it wont be manageable to make any changes to them via the GUI like if you had to change one of the forwarder IP address for all of them at once.

The only better way is to write a small script which will generate an output that is required by the config for whatever software that you plan to use.

What I can think of is a DNS app which lets you provide a set of forwarders and then provide a list of all the domain names that must use the forwarder.

Something like this:

{
  "forwarderZones": [
    {
      "forwarders": [
        "192.168.1.1",
        "119.29.29.29"
      ]
      "domains": [
        "example1.com",
        "example2.com",
        "example3.com",
        ...
      ]
    }
  ]
}

So you will need to generate a json text in the above format for all the domain names and then paste this as the config for the DNS app that can do conditional forwarding.

LittleGrocery commented 3 years ago

Well, 70,000 domain names are too many to manage from the UI. While it is possible to create so many zones on the DNS server, it wont be manageable to make any changes to them via the GUI like if you had to change one of the forwarder IP address for all of them at once.

The only better way is to write a small script which will generate an output that is required by the config for whatever software that you plan to use.

What I can think of is a DNS app which lets you provide a set of forwarders and then provide a list of all the domain names that must use the forwarder.

Something like this:

{
  "forwarderZones": [
    {
      "forwarders": [
        "192.168.1.1",
        "119.29.29.29"
      ]
      "domains": [
        "example1.com",
        "example2.com",
        "example3.com",
        ...
      ]
    }
  ]
}

So you will need to generate a json text in the above format for all the domain names and then paste this as the config for the DNS app that can do conditional forwarding.

DNS Server forward zones files can't edit with EditPlus or ordinary text edit tools. If it can, I can edit it just like unbound files with RegExp in batch. I think it would be great.

ShreyasZare commented 3 years ago

DNS Server forward zones files can't edit with EditPlus or ordinary text edit tools. If it can, I can edit it just like unbound files with RegExp in batch. I think it would be great.

The DNS App for forwarder will use such json format. So, if that works out then a conditional forwarder app can be created for this scenario.