edit: spent all day tryimg to make this work, in the end i got rid of the opnsense services, unbound and dnsmasq, and brought dhcp over to tDNS
I have been trying to set up Technitium DNS server (TDNS hereafter) for its clustering and fail over capabilities, it really does seem to be a one stop shop for DNS capabilities. But I have been hitting a wall so I’m asking if anyone here can see the flaw in my plan.
I have not been using TDNS for DHCP as it lacks ipv6 and router advertisements right now. And I like the idea of DHCP on the firewall router.
I have an opnsense firewall with DNSmasq performing DHCP and DNS forwarding to the Technitium server, which is hosted on proxmox in an lxc. I own my own public domain, example.com for our purposes here.
TDNS is set to “allow recursion only for private networks” this means that if something external tried to resolve using my TDNS they’ll be refused, correct? I ask because that could as be interpreted as not forwarding to external dns when needed.
I set NAT rules to force TDNS port 53 routing. TDNS is set to forward to quad9 and cloud flare externally. DNS blocking lists are set in TDNS.
I don’t really know what I’m doing with zones but I have a primary zone set with example.com. I set some static hosts records in this zone and enabled reverse lookup, expecting servicehost.example.com
query logs app enabled in TDNS.
Edit: 10.2.0.1 turned out to be my vpn’s dns server (When nslookup google.com from a laptop on this LAN, it returns Server: 10.2.0.1 Address: 10.2.0.1#53
nonauthoritative answer: google.com with ip information repeated.
I don’t under stand this return as it’s an ip outside my lan net and dhcp provisioning.)
Unable to reach external net when NAT rules active.
It seems the DHCP is handing out the fire wall’s ip for DNS server, 100.100.100.1 is that the expected behavior since DNSmasq should be forwarding to TDNS 100.100.100.333. Why not just hand out the TDNS address?
Do I have some setting misconfigured in either DNSmasq/opnsense or TDNS?


I’m unclear on what you’re confused about regarding the above quote. Here comes an explanation of nslookup.
The command is nslookup <domain> <dns-server> and if dns-server is empty it uses your default. F.e.:
The response starts by telling you which <dns-server> it used for the lookup and which address including port was used:
It then gives you the answer on where to find the <domain>, once for ipv4 and once for ipv6:
edit: I think I understand your question a bit better now. To check which dns-server you’re using do a “cat /etc/resolve.conf”
If you run a distro with systemd then use the command “resolvectl status”
Thanks for taking the time to comment.
My confusing was that <dns-server> used for the look up wasnt in my net nor upstream dns.
I turned off my vpn and it resolved as expected, so I suppose that 10.2.0.1 is the dns server for my vpn provider.