netbird icon indicating copy to clipboard operation
netbird copied to clipboard

netbird conflicts with adguardhome on ubuntu 22 server

Open joshymg opened this issue 1 year ago • 6 comments

Describe the problem

Server already running adguardhome (docker), and everything works. Later I installed netbird, and that makes adguardhome fail on port 53 conflict.

To Reproduce

  1. on the adguardhome machine: netbird installed, connected once, then 'netbird down'
  2. Self hosted netbird management server, with DNS feature enabled, and nameserver address pointing to the netbird peer IP where I am running adguardhome.
  3. 'netbird up' on the adguard host. adguardhome docker exits. Restarting the docker also not working.
  4. 'netbird down' on the adguard host. Starting adguardhome docker succeeds.

Expected behavior

netbird client should not impact adguardhome dns server.

Are you using NetBird Cloud?

self-hosted netbird-ce .

NetBird version

netbird 0.27.3

joshymg avatar Apr 17 '24 14:04 joshymg

I think I spoke too soon!! On a detailed check, it was my custom dns config in netplan config seems to be the cause. The nameserver entry was set to my lan router IP instead of 127.0.0.1, while I was testing something else. Reverted it, then 'netplan apply'; all good now. Thanks.

joshymg avatar Apr 18 '24 02:04 joshymg

I have tried many ways to fix the issue. My observations:

  1. On reboot, adguardhome docker starts okay.
  2. Once the netbird service starts, that docker exits. Can see error related to 0.0.0.0:53 port not available.
  3. 'netbird down, start the docker manually, all okay.
  4. Disable netbird service, and, reboot.
  5. adguardhome docker start for a moment, then exits, error: port conflict.
  6. added 'ExecStartPre=/bin/sleep 30' to /etc/systemd/system/netbird.service, then reboot.
  7. Same result as step 5.
  8. If I disable 'Nameserver' on the management server/DNS/Nameservers page, all works normal.

Looking for ideas to fix this.

joshymg avatar Apr 19 '24 02:04 joshymg

Have you looked into the --dns-resolver-address CLI flag or NB_DNS_RESOLVER_ADDRESS env var: https://docs.netbird.io/how-to/cli#up

lixmal avatar Apr 19 '24 08:04 lixmal

For the time being I have tweaked the Nameserver - Distribution groups, and Access policies, and made it to work. In short, the DNS will not be applied to the adguardhome peer. Not sure, if that made it work!!! Will try for a few days and see.

joshymg avatar Apr 19 '24 09:04 joshymg

For the time being I have tweaked the Nameserver - Distribution groups, and Access policies, and made it to work. In short, the DNS will not be applied to the adguardhome peer. Not sure, if that made it work!!! Will try for a few days and see.

Thanks for the help, I added adguard host to a group and disabled dns management for that group, Now it works, TY

bigmehmet avatar Jun 27 '24 11:06 bigmehmet