TechnitiumSoftware / DnsServer

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

Add to reverse zone while DHCP is turned on? #107

Closed tcox2 closed 4 years ago

tcox2 commented 4 years ago

If you turn on DHCP, you can no longer edit the reverse zone

I'd like to add the server that runs Technitium to it. That server doesn't use DHCP, but it should be added to the reverse zone. I am unable to add it.

Other than this, Technitium is cool :-)

ShreyasZare commented 4 years ago

Thanks for the feedback. The forward and reverse zones created by DHCP server are marked as internal and thus they are not stored on disk and making changes to the zone is not permitted.

There is a workaround for this though. Disable the DHCP scope for a moment, restart the DNS server and then create the forward and reverse zones yourself. Once you have the zones created, these will be stored on disk and wont be marked as internal. Now, enable the DHCP scope and it will use the existing zones to add records while you can manually add your own records.

tcox2 commented 4 years ago

Thanks for this Shreyas.

Unfortunately this is what happens when I disable the DHCP scope:

2019-12-30 16:41:00 UTC] Logging started. [2019-12-30 16:41:00 UTC] [10.1.1.116:60893] [admin] Log file was deleted: 2019-12-30 [2019-12-30 16:41:05 UTC] [10.1.1.3:67] DHCP Server failed to deactivate scope: Default System.NullReferenceException: Object reference not set to an instance of an object. at TechnitiumLibrary.Net.Dns.DnsClient.IsDomainNameValid(String domain, Boolean throwException) at DnsServerCore.Dns.Zone.ConvertDomainToPath(String domainName) at DnsServerCore.Dns.Zone.GetZone(Zone rootZone, String domain, Boolean authoritative) at DnsServerCore.Dhcp.DhcpServer.UpdateDnsAuthZone(Boolean add, Scope scope, Lease lease) at DnsServerCore.Dhcp.DhcpServer.DeactivateScope(Scope scope) [2019-12-30 16:41:05 UTC] [10.1.1.116:60893] DnsServerCore.WebServiceException: Failed to disable DHCP scope, please check logs for details: Default at DnsServerCore.WebService.DisableDhcpScope(HttpListenerRequest request) at DnsServerCore.WebService.ProcessRequestAsync(Object state)

On Mon, 30 Dec 2019 at 06:48, Shreyas Zare notifications@github.com wrote:

Thanks for the feedback. The forward and reverse zones created by DHCP server are marked as internal and thus they are not stored on disk and making changes to the zone is not permitted.

There is a workaround for this though. Disable the DHCP scope for a moment, restart the DNS server and then create the forward and reverse zones yourself. Once you have the zones created, these will be stored on disk and wont be marked as internal. Now, enable the DHCP scope and it will use the existing zones to add records while you can manually add your own records.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/TechnitiumSoftware/DnsServer/issues/107?email_source=notifications&email_token=AABYQWFDIIR7IVRWQV2KVXDQ3GKSJA5CNFSM4KBEZITKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHZV6TA#issuecomment-569597772, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABYQWATYDI66FTFYRO4KPLQ3GKSJANCNFSM4KBEZITA .

ShreyasZare commented 4 years ago

Thanks again for the details. This is a known bug in DHCP code which occurs when any of the client's hostname is invalid or null.

This has already been fixed and an update is scheduled to be released by this weekend.

tcox2 commented 4 years ago

Makes sense. It started happening when I introduced a new client. I look forward to the new release. :-)

On Tue, 31 Dec 2019 at 06:59, Shreyas Zare notifications@github.com wrote:

Thanks again for the details. This is a known bug in DHCP code which occurs when any of the client's hostname is invalid or null.

This has already been fixed and an update is scheduled to be released by this weekend.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/TechnitiumSoftware/DnsServer/issues/107?email_source=notifications&email_token=AABYQWHXWE5Q2GRB7QHRWLDQ3LUUTA5CNFSM4KBEZITKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH32EQI#issuecomment-569877057, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABYQWE3X7PCKCL7NBL4ZZDQ3LUUTANCNFSM4KBEZITA .

ShreyasZare commented 4 years ago

@tcox2 : new update v4.1 is now available. Do try the workaround mentioned earlier with this new release.

tcox2 commented 4 years ago

Thanks Shreyas - I will try it out today or tomorrow and will let you know.

On Sat, 4 Jan 2020 at 10:21, Shreyas Zare notifications@github.com wrote:

@tcox2 https://github.com/tcox2 : new update v4.1 is now available. Do try the workaround mentioned earlier with this new release.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TechnitiumSoftware/DnsServer/issues/107?email_source=notifications&email_token=AABYQWGF7NGCOE6SUMSQATTQ4BPI5A5CNFSM4KBEZITKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICVAYA#issuecomment-570773600, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABYQWEXHPU44TUNYLVVANTQ4BPI5ANCNFSM4KBEZITA .

tcox2 commented 4 years ago

All good now :-)

I'm really happy to have found Technitium.

On Sat, 4 Jan 2020 at 11:21, Tim Cox mail@tcox.org wrote:

Thanks Shreyas - I will try it out today or tomorrow and will let you know.

On Sat, 4 Jan 2020 at 10:21, Shreyas Zare notifications@github.com wrote:

@tcox2 https://github.com/tcox2 : new update v4.1 is now available. Do try the workaround mentioned earlier with this new release.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/TechnitiumSoftware/DnsServer/issues/107?email_source=notifications&email_token=AABYQWGF7NGCOE6SUMSQATTQ4BPI5A5CNFSM4KBEZITKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEICVAYA#issuecomment-570773600, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABYQWEXHPU44TUNYLVVANTQ4BPI5ANCNFSM4KBEZITA .

ShreyasZare commented 4 years ago

Issue fixed in new release.