netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
11.1k stars 511 forks source link

Allow custom TLDs in DNS #2496

Open soymgomez opened 2 months ago

soymgomez commented 2 months ago

Describe the solution you'd like While implementing Netbird for a client we have found that they use a custom TLD of the type .company for their internal domains. In the DNS section it only allows to add domains and we cannot add that TLD.

For this case we have modified directly in the sqlite the domain field to include only the custom TLD and everything has worked correctly.

It would be interesting to allow or have a space to add custom TLDs apart from the domains or to allow them as well as the domains.

mlsmaycon commented 2 months ago

@soymgomez this was a change made for the Nameserver configuration or for the peer domain?

michelangelo136 commented 2 months ago

This would be of use to us as well, could you provide a quick example on how you performed this change?

mlsmaycon commented 2 months ago

@michelangelo136 this was a change made for the Nameserver configuration or for the peer domain?

soymgomez commented 2 months ago

@soymgomez this was a change made for the Nameserver configuration or for the peer domain?

For "Match domains" in Nameservers configuration:

image

When editing the nameserver now it appears as invalid because the change was made directly in the database.

This would be of use to us as well, could you provide a quick example on how you performed this change?

We made the change directly in the database, in this case in the sqlite file:

sqlite3 /var/lib/docker/volumes/artifacts_netbird-mgmt/_data/store.db
sqlite> UPDATE name_server_groups SET `domains` = '["company"]';
mlsmaycon commented 2 months ago

@soymgomez, thanks. Have you tested the API?

@heisbrot, we can probably use a custom parser for the match domain input.

soymgomez commented 2 months ago

@soymgomez, thanks. Have you tested the API?

I hadn't tried it, I'll set up a test environment now and see if it will let me add it like this.