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.24k stars 517 forks source link

Support for wildcard domains [*.example.com] #2908

Open tiog55 opened 3 days ago

tiog55 commented 3 days ago

Is your feature request related to a problem? Please describe. When dealing with multi-tenancy, an usual approach is to use wildcard domains. Unfortunately, NetBird's routing concept doesn't include this as they only support fixed domains, like example.com, which are resolvable to one or more IPv4 addresses, where in contrast, wildcard would need an example to resolve, e.g. *.example.com is not directly resolvable, but foo.example.com would be.

Describe the solution you'd like I'd like to have the possibility of adding a wildcard domain for my network route and if any matching domain is called, the route is used to route the traffic to a peer/peer group. For example, I'd like to configure a network route for *. example.com and all matching domains requests like foo.example.com, ..., bar.example.com are then routed over my configured routing peer/peer group.

Describe alternatives you've considered The current workaround is to add each domain to the network route, but this is also limited to 32 domains. An alternative workaround is to use Network Ranges, which might also include other services or even worse in case of public IP addresses, they also contain other public services, which shouldn't be routed over routing peer/peer group.

Screenshot 2024-11-19 at 12 18 39