DnsServer
DnsServer copied to clipboard
Determine zone status via app
Is there a way to determine a zone's enabled status via an app?
Thanks for the post. If you meant the web app then yes, you can find if the zone is enabled from the web console and from the HTTP API.
Hello,
I meant from within an “app” or plugin. Technitium has a lot of cool apps to choose from, but none that do what I am looking for.
I meant from within an “app” or plugin. Technitium has a lot of cool apps to choose from, but none that do what I am looking for.
DNS Apps don't have direct access do the DNS server core. You can use the DirectQueryAsync() method to query with recursion desired set to false and find out if the zone is being served.
Another option is to use the HTTP API directly in the DNS App and get full control of the DNS server.
It will be great if you can describe what your are looking for implementing with the DNS apps since the DNS server is still evolving and interesting ideas can be added to it with every update.
When a zone is disabled, would like to return an A/CNAME record response to an IP/hostname of my choice to indicate to the end-user that the zone has been suspended/disabled. Basically the A record/CNAME response would point to a small web site that simply states the zone has been suspended etc. etc.
When a zone is disabled, would like to return an A/CNAME record response to an IP/hostname of my choice to indicate to the end-user that the zone has been suspended/disabled. Basically the A record/CNAME response would point to a small web site that simply states the zone has been suspended etc. etc.
There are multiple ways that I can think of to build this:
-
If you have a database of your own that has list of the hosted zones then you can just add one parameter to specify if the zone is suspended. Then use the same database in your DNS app to check for the status and if the zone is suspended, return the IP address for your web server that shows the suspended page. Thus the app will override any response for the hosted zone.
-
You can use the DirectQueryAsync() method with a request with recursion desired set to false. If the zone is disabled or not hosted by the DNS server then the method will return a response with RCODE as Refused. Using this as the signal your DNS App can then respond with the IP address of your web server.
-
As mentioned earlier, you can use the HTTP API from the DNS app and find out the zone status and respond accordingly.
I will try to plan some options to allow DNS apps to be able to have more access to DNS server to make it easier to build apps that require such access.
Thanks...
- This could work, but this would also mean adding additional resources into the DNS server to query our control panel database system
- This could work, though, would be nice to differentiate between suspended and simply not existing
- Yes, though, having it self-contained without having to rely on storing credentials would be nice
Would be great if we could get a self-contained solution that did not rely on external data or having to pass around credentials for database servers and APIs. Especially, since this is a plugin of the DNS server, it could have direct access to the DNS server internals for such things.
Thanks...
* This could work, but this would also mean adding additional resources into the DNS server to query our control panel database system * This could work, though, would be nice to differentiate between suspended and simply not existing * Yes, though, having it self-contained without having to rely on storing credentials would be nice
Would be great if we could get a self-contained solution that did not rely on external data or having to pass around credentials for database servers and APIs. Especially, since this is a plugin of the DNS server, it could have direct access to the DNS server internals for such things.
Yes it will be quite useful to have a more access to the DNS server from the DNS Apps. Will plan to add more options to access and manage the DNS server via apps.