Ad Guard doesnt work on Truenas Scale

Hi everyone

Recently I installed AdGuard on my Trunas scale, and it didn’t work. I found by myself that AdGuard used the port 53, and on my NAS I have Dnsmasq that uses the same port, and I didn’t install Dnsmasq, but apparently it’s necessary for some apps.
I tried to change the Adguard port, but the filters on Adguard are ignored. With the help of chat gpt I found that adguard doesn’t listen on the new port (8053) and the port 53 or it’s blocked by something.
I tried to disable Dnsmasq but I can’t maybe cause of some permissions.
I just want to install AdGuard, so if someone has the same issue, please help me.

Thnak you for your time.

Which version of truenas are you on? If you’re on 25.04 it may not be dnsmasq but incus blocking the port and there’s a command to change the incus port
See:

my truenas is on 25.04.1

then it’s incus blcoking port 53. You can change the incus port with this command

sudo incus network set incusbr0 raw.dnsmasq="port=5354"

ok thank you, and last question, is changing the port cause issues with something?

No. I’ve changed it in april and didn’t have problems until now.

ok thank you for your response

I created a LXC Container with ubuntu under TrueNAS and installed Adguard on that machine.
Here is a good giude for settig up Adguard Home:

I still try to get Adguard working on my Android as an Private DNS.
Phone is connected via Tailnet (Headscale) to my TrueNAS.