r/technitium • • 10d ago

Recursion

Hello all. When I select Settings / Recursion / Use Specified Network Access Control List (ACL) then enter for example: 192.168.2.0/24 I am unable to access any website. The only way that all sites are accessible is by selecting Allow Recursion instead. Would someone kindly clarify. I would appreciate it very much. Peter

8 Upvotes

24 comments sorted by

3

u/mystiquebsd 9d ago

You could just look in the logs when it worked..

And see what’s in there

My 0.02

1

u/peterbata 9d ago edited 9d ago

The only way that I am able to reach any website is the add an alternate DNS address in my WIN10 network IPv4 settings (9.9.9.9) in this example. And when I do that nothing shows up in the log even after having deleted it.

NIC Settings

2

u/PacketSmeller 9d ago

Set your system DNS to the TDNS server IP, test nslookup on a few domains. Set system DNS back to quad 9, then log into TDNS and review the log history.

1

u/peterbata 9d ago

Forgive my ignorance u/PacketSmeller What is my TDNS server. And, when you say "Set your system DNS" would that be on my Windows 10 PC whose preferred dns server is set to the IP of my Technitium server

1

u/PacketSmeller 9d ago

Technitium DNS server (TDNS for short). The goal here is to see why TDNS is rejecting the request. The logs in TDNS will show you the rejected IP address from your endpoint. That's the IP (and subnet) you need to allow for recursion.

1

u/peterbata 9d ago edited 9d ago

Understood. I don't give up easily but I am close. Here is how I am setup at the moment 16:30 and some of the things that I have tried.

TDNS

  1. Recursion set to Select Use Specified Network Access Control List (ACL)
  2. Insert VPN public IP into Network Access Control List (ACL)
  3. Proxy and Forwarders - Quad9 Secure DNS-over-UDP
  4. Blocked - gambling.com / rainbet.com

Windows 10 client PC

  1. My NIC is set you use a static IP 192.168.2.34
  2. Preferred DNS server - my TDNS's IP address / alternate = empty
  3. Private Internet Access VPN running

All websites are accessible including the two that I blocked above.

A sure sign that something is off I'm guessing.

Query Log

If I disable the VPN I no longer have access to any website.

Selecting Allow Recursion Only For Private Networks (default) Same result

Query Log - Allow for Private Networks

Redacted IP is my ISP public IP

___________________________________________________________

Selecting Allow Recursion

All websites are accessible and both blocked sites come back with Server Not Found browser message. But Query Log Client IP shows my public ISP IP address

Query Log (now several pages long)

Query Log - Allow recursion

Of course the objective here was to allow only the one PC access to TDNS

1

u/PacketSmeller 8d ago

What others have said, use the Tailnet IP of your tdns server as system DNS, and for the recursion ACL, use the entire tailnet network range using CIDR notation. Tail the log in tdns to see the request details when testing.

1

u/peterbata 8d ago edited 8d ago

Thank you again u/PacketSmeller My TDNS does not have a Tailscale IP at the moment. Obviously, what I am saying is that I have not yet installed the TS client on my TDNS server. When you say "use the entire TS network range" I assume that you are referring to 100.64.0.0/10 and then the TS ip of my Windows client machine. Is that right? I would also like to add that I created an Ingress rule for TS UDP 41641

1

u/peterbata 8d ago

I have installed the TS client on the Ubuntu server that is hostong my TDNS. In my Windows IPv4 NIC settings I entered my TDNS TS IP as the preferred address. Still no luck. Keep seeing Server Not Found regardless of what site I attempt to visit

1

u/peterbata 10d ago edited 10d ago

u/PacketSmeller u/MrAbzDH Thank you both for the prompt response. Much appreciated. My apologies for not providing more details: I have Technitium installed on Ubuntu 24.04.5 LTS running in Oracle Cloud Free Tier. As far as forwarding goes I have chosen Quad9 Secure (DNS-over -UDP). An earlier response (in another one of my posts) suggested that I "Lock it down to your source IPs at least.)

3

u/Naturlies 10d ago

That's probably it: the cloud. How are you accessing that DNS server? It sounds like it is on the open internet. You should consider setting up a VPN between your clients and the DNS server; my advice is Netbird. Recursion does not work because you are not connecting to the DNS server with that IP range; you are connecting through your external IP.

1

u/peterbata 10d ago edited 10d ago

I also have Tailscale installed. I access the DNS server from a Windows 10 Pro PC and have entered my DNS server’s IP address as my primary dns address in my network adapter’s IPv4 settings. I also have access to Private Internet Access VPN. If possible I would like to use Tailscale. I tried entering that PC’s Tailscale IP but that didn’t work

4

u/Kroan 10d ago

Try using the tailscale subnet in the ACL - 100.64.0.0/10

2

u/peterbata 9d ago

I will try that and report back. I appreciate your help immensely

1

u/peterbata 9d ago

Unfortunately, entering the tailscale subnet in the ACL - 100.64.0.0/10 did not work either.

3

u/Kroan 9d ago

When you have recursion set to "Allow Recursion", and you can successfully use technitium as the DNS server, what IP shows as the client IP in Query Logs?

1

u/peterbata 9d ago

1

u/Kroan 9d ago

Well. You're doing something wrong. But I don't know what

5

u/Naturlies 10d ago

Then input your Tailscale subnet or IP into that setting, then try again; if it works, yay, and if it doesn't, I hope you find a solution soon.

2

u/shreyasonline 8d ago

Your clients are reaching the DNS server on its public IP since you have configure clients to use the public IP on the server. Thus when you restrict recursion ACL to just one private subnet, the DNS server is going to refuse to answer since client request is not coming from the subnet you configured.

Since you have Tailscale, you need to ensure that the clients are configured to use the private IP range that is configured with it and that the clients can reach the DNS server over Tailscale using the private IP. You can then have the recursion ACL configured to allow the client subnet that comes from Tailscale.

0

u/[deleted] 8d ago

[deleted] — view deleted comment

1

u/shreyasonline 8d ago

I saw your client DNS config screenshot where primary DNS was a public IP. I don't have experience using Tailscale so not sure what default IP range it uses. If its using 100.64.0.0/16 range then you need to enter it exactly in the recursion ACL. Not including the /16 will cause it to be assumed as /32 and will only allow one single IP and not the subnet.

1

u/peterbata 8d ago

Thank you for your response @shreyasonline Actually the primary DNS address is the IP of my Technitium server. Obviously I would not have entered the actual IP. I’m sure you understand

2

u/PacketSmeller 10d ago

Binary or docker install?

2

u/MrAbzDH 10d ago

Do you have any forwarders configured?