Hostname can't be resolved in ubuntu server 22.04 #435

Closed
opened 2025-11-20 05:11:20 -05:00 by saavagebueno · 5 comments
Owner

Originally created by @caiomendonca on GitHub (Sep 5, 2023).

Describe the problem
Name resolution for netbird.cloud does not work if not have configured dns server in netbird cloud. I did a clean installation of ubuntu 22.04 in lxc container and installed the netbird client via script provided in the docs.
When i try resolve a device name connected in the network, the message like "name or service not know" displayed.
When i configure any dns server like cloudflare or google in netbird cloud, the netbird.cloud names can be resolved normally, but if I enable the "Match Domains" option, the problem happens again. This problem does not happen on Windows.

I don't know if it's a bug or incorrect configuration, but I did several tests and I couldn't solve this problem

To Reproduce
Steps to reproduce the behavior:
Install ubuntu 22.04
Execute script provided on https://pkgs.netbird.io/install.sh and up the netbird client
disable dns server for this host in netbird.cloud

Expected behavior
any hostname in .netbird.cloud name resolved without needing dns server configuration

Screenshots
/var/log/netbird/client.log output:
error_netbird

Additional context
My test host is installed in lxc container on Proxmox

Originally created by @caiomendonca on GitHub (Sep 5, 2023). **Describe the problem** Name resolution for netbird.cloud does not work if not have configured dns server in netbird cloud. I did a clean installation of ubuntu 22.04 in lxc container and installed the netbird client via script provided in the docs. When i try resolve a device name connected in the network, the message like "name or service not know" displayed. When i configure any dns server like cloudflare or google in netbird cloud, the netbird.cloud names can be resolved normally, but if I enable the "Match Domains" option, the problem happens again. This problem does not happen on Windows. I don't know if it's a bug or incorrect configuration, but I did several tests and I couldn't solve this problem **To Reproduce** Steps to reproduce the behavior: Install ubuntu 22.04 Execute script provided on https://pkgs.netbird.io/install.sh and up the netbird client disable dns server for this host in netbird.cloud **Expected behavior** any hostname in .netbird.cloud name resolved without needing dns server configuration **Screenshots** /var/log/netbird/client.log output: ![error_netbird](https://github.com/netbirdio/netbird/assets/12699381/960eeec7-8a92-405f-b263-572bb4072e93) **Additional context** My test host is installed in lxc container on Proxmox
Author
Owner

@pappz commented on GitHub (Sep 5, 2023):

This situation is a well known limitation in case the Linux distribution support the resolv.conf type DNS settings only. The reason is very simple, for the resolv.conf we can not set match domain settings. What is interesting for me is why do not available the systemd approach.

@pappz commented on GitHub (Sep 5, 2023): This situation is a well known limitation in case the Linux distribution support the resolv.conf type DNS settings only. The reason is very simple, for the resolv.conf we can not set match domain settings. What is interesting for me is why do not available the systemd approach.
Author
Owner

@pappz commented on GitHub (Sep 6, 2023):

@caiomendonca could you share with me the /etc/resolv.conf file and the /etc/resolv.conf.original.netbird file?

@pappz commented on GitHub (Sep 6, 2023): @caiomendonca could you share with me the /etc/resolv.conf file and the /etc/resolv.conf.original.netbird file?
Author
Owner

@caiomendonca commented on GitHub (Sep 7, 2023):

@pappz thanks for the reply.

follows the contents of /etc/resolv.conf file


search net.clm.local
nameserver 192.168.1.10
nameserver 8.8.8.8
nameserver 1.1.1.1


I couldn't find the /etc/resolv.conf.original.netbird file

the netbird client version is 0.23.0.

@caiomendonca commented on GitHub (Sep 7, 2023): @pappz thanks for the reply. follows the contents of /etc/resolv.conf file --- search net.clm.local nameserver 192.168.1.10 nameserver 8.8.8.8 nameserver 1.1.1.1 --- I couldn't find the /etc/resolv.conf.original.netbird file the netbird client version is 0.23.0.
Author
Owner

@pappz commented on GitHub (Sep 12, 2023):

Thank you! It looks fine and it confirm that on your system the systemd resolver is not enabled. You can not see backup file because you checked that time when the agent has been stopped I suppose. So as you can read in the documentation:

Currently, only MacOS, Windows 10+, and Linux running systemd-resolved support nameservers without an all domains resolver. For a better experience, we recommend setting at least one all domain resolver to be applied to all groups.

So you have two option. You set a permanent DNS configuration on the Dashboard for this peer or you configure up the systemd-resolved service.

@pappz commented on GitHub (Sep 12, 2023): Thank you! It looks fine and it confirm that on your system the systemd resolver is not enabled. You can not see backup file because you checked that time when the agent has been stopped I suppose. So as you can read in the [documentation](https://docs.netbird.io/how-to/manage-dns-in-your-network): ``` Currently, only MacOS, Windows 10+, and Linux running systemd-resolved support nameservers without an all domains resolver. For a better experience, we recommend setting at least one all domain resolver to be applied to all groups. ``` So you have two option. You set a permanent DNS configuration on the Dashboard for this peer or you configure up the systemd-resolved service.
Author
Owner

@caiomendonca commented on GitHub (Sep 14, 2023):

I understand, thanks for the help!

@caiomendonca commented on GitHub (Sep 14, 2023): I understand, thanks for the help!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#435