TechnitiumSoftware / DnsServer

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

How to setup DNS name resolver using Technitium first, if not find, then use 8.8.8.8 #940

Closed mikesiwer closed 3 months ago

mikesiwer commented 3 months ago

Hi, I am new, this is a basic question. I want to find domain name using [Technitium] DNS first, and if not found then use 8.8.8.8 I tried forwarders and it doesn't work, I may misconfig something.

Screenshot 2024-05-31 at 7 53 52 PM

I find youtube video, but it only use 10 sec about forwarder part. https://www.youtube.com/watch?v=o3hu7Lty7cY&ab_channel=YeehawItsJake

Please help.

ShreyasZare commented 3 months ago

Thanks for asking. The config looks right. What errors do you see in the DNS logs from the admin panel? Try using the DNS Client tab on the panel to test any domain and share the output here.

mikesiwer commented 3 months ago
Screenshot 2024-06-03 at 1 40 58 PM Screenshot 2024-06-03 at 1 41 19 PM

{ "Metadata": { "NameServer": "dns.nebulablock.local (127.0.0.1)", "Protocol": "Udp", "DatagramSize": "123 bytes", "RoundTripTime": "0.67 ms" }, "EDNS": { "UdpPayloadSize": 1232, "ExtendedRCODE": "NxDomain", "Version": 0, "Flags": "None", "Options": [] }, "Identifier": 0, "IsResponse": true, "OPCODE": "StandardQuery", "AuthoritativeAnswer": false, "Truncation": false, "RecursionDesired": true, "RecursionAvailable": true, "Z": 0, "AuthenticData": false, "CheckingDisabled": false, "RCODE": "NxDomain", "QDCOUNT": 1, "ANCOUNT": 0, "NSCOUNT": 1, "ARCOUNT": 1, "Question": [ { "Name": "cloud01.nebulablock", "Type": "A", "Class": "IN" } ], "Answer": [], "Authority": [ { "Name": "", "Type": "SOA", "Class": "IN", "TTL": "86345 (23 hours 59 mins 5 sec)", "RDLENGTH": "64 bytes", "RDATA": { "PrimaryNameServer": "a.root-servers.net", "ResponsiblePerson": "nstld@verisign-grs.com", "Serial": 2024060300, "Refresh": 1800, "Retry": 900, "Expire": 604800, "Minimum": 86400 }, "DnssecStatus": "Disabled" } ], "Additional": [ { "Name": "", "Type": "OPT", "Class": "1232", "TTL": "0 (0 sec)", "RDLENGTH": "0 bytes", "RDATA": { "Options": [] }, "DnssecStatus": "Disabled" } ] }

Above is the response from DNS client. Below is the log [2024-06-03 17:36:53 UTC] [0.0.0.0:68] DHCP Server offered IP address [172.201.1.17] to ubuntu [52-54-00-CC-19-B8] for scope: cloud01.nebulablock [2024-06-03 17:36:53 UTC] [0.0.0.0:68] DHCP Server leased IP address [172.201.1.17] to ubuntu [52-54-00-CC-19-B8] for scope: cloud01.nebulablock [2024-06-03 17:36:57 UTC] DHCP Server successfully saved scope file: /etc/dns/scopes/cloud01.nebulablock.scope [2024-06-03 17:39:08 UTC] DnsServerCore.Dns.DnsServerException: Cannot use DNS-over-TLS protocol for 'this-server'. Please use the TLS certificate domain name as the server. at DnsServerCore.WebServiceApi.ResolveQueryAsync(HttpContext context) in Z:\Technitium\Projects\DnsServer\DnsServerCore\WebServiceApi.cs:line 276 at DnsServerCore.DnsWebService.WebServiceApiMiddleware(HttpContext context, RequestDelegate next) in Z:\Technitium\Projects\DnsServer\DnsServerCore\DnsWebService.cs:line 591 at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task) [2024-06-03 17:40:43 UTC] DNS Server config file was saved: /etc/dns/dns.config [2024-06-03 17:40:43 UTC] [40.49.255.9:50086] [admin] DNS Settings were updated successfully. [2024-06-03 17:40:48 UTC] [40.49.255.9:50108] [admin] Cache was flushed. [2024-06-03 17:40:49 UTC] DNS Server config file was saved: /etc/dns/dns.config [2024-06-03 17:40:49 UTC] [40.49.255.9:50108] [admin] DNS Settings were updated successfully.

My VM got Ip from Technitium still Temporary failure in name resolution

ShreyasZare commented 3 months ago

It seems that you have not configured the Domain Name option in the DHCP Scope. You need to configure it so that the DHCP server creates a primary zone for that domain and maintain DNS entries for each client lease automatically.

mikesiwer commented 3 months ago

thank you so much. works