Skip to content

Commit e3f60a9

Browse files
committed
feat: in-depth domain Resources documentation
1 parent 1324479 commit e3f60a9

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

src/pages/how-to/networks.mdx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,48 @@ IP addresses, IP ranges, domain names, or wildcard domains (e.g., *.company.inte
5151
Support to exit nodes and site-2-site VPNs may become available in future releases. In the meantime you can use [Network routes](/how-to/routing-traffic-to-private-networks) add your exit-node routes and site-2-site routes.
5252
</Note>
5353

54+
### Domain Resources
55+
56+
In addition to routing IP addresses, NetBird also supports routing domain names. In the Dashboard you can just pass
57+
a domain name (eg: `example.com`) or a wildcard domain (eg: `*.example.com`) in place where you would normally
58+
put an IP address range. Then NetBird clients will start responding to and routing the given domain.
59+
60+
<Note>
61+
Due to a mix of a bug and initial design choice clients running `0.59.0` & `0.59.1` might not be able to resolve
62+
domain Resources served by Routing Peers running versions `0.59.0` to `0.59.9` in case when all the Peers in the
63+
NetBird organization are running versions `0.59.0` or newer.
64+
65+
Installing client in versions `<= 0.58.2` or `>= 0.59.2` or upgrading a Routing Peer to version `0.59.10+` will
66+
resolve this issue.
67+
</Note>
68+
69+
On a technical level the feature works as follows:
70+
71+
1. Initially (when NetBird connects) the operating system is instructed to use NetBird to resolve the requested
72+
domain(s). No routing rules are configured yet.
73+
2. An Application (could be a web browser) requests a domain `example.com` from the Operating System
74+
1. the Operating System requests a name from NetBird's Local Resolver, by default running on port `53` of:
75+
- for MacOS & Windows: the highest available IP address in your NetBird range, usually `100.xxx.255.254:53`
76+
- for other systems: local NetBird client's IP address, eg: `100.xxx.123.45`
77+
2. the Local Resolver forwards the query to Routing Peer's IP address and the following port:
78+
- `22054` for version `0.59.0` and newer
79+
- `5353` for versions below `0.58.x` and older
80+
3. the Routing Peer resolves the domain name using it's local configuration (often independent of NetBird) and returns
81+
the result.
82+
4. the Local Resolver sets up routing rules for IP addresses returned from the query, before returning them to the Application
83+
3. the Application receives the result "as usual", except for a slight delay before all of the above takes place the
84+
first time a domain name is requested,
85+
4. all subsequent requests to `example.com` will be served instantly from the Local Resolver's cache
86+
87+
<Note>
88+
NetBird tries its best to automatically open up DNS forwarder ports on Routing Peer's firewalls, but might fail on
89+
some system configurations and you might need to open up above 2 ports manually.
90+
91+
You can verify that firewall allows the DNS request in using following command issued from the clients device
92+
`nslookup -port=22054 <routed-domain> <routing-peer-ip>`, eg: `nslookup -port=22054 example.com 100.123.45.67`.
93+
94+
This is by far the most common cause of issues with domain Resources.
95+
</Note>
5496

5597
## Manage access to resources
5698

0 commit comments

Comments
 (0)