Skip to content

Commit 6928d3f

Browse files
authored
feat: in-depth domain Resources documentation (#465)
* feat: in-depth domain Resources documentation * feat: domain Resources troubleshooting section
1 parent 155671a commit 6928d3f

File tree

2 files changed

+291
-17
lines changed

2 files changed

+291
-17
lines changed

src/pages/how-to/networks.mdx

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,56 @@ 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+
Please consult the
61+
[Debugging access to Domain Resources](/how-to/troubleshooting-client#debugging-access-to-domain-resources)
62+
documentation to troubleshoot common issues with this type of resources yourself.
63+
64+
<Note>
65+
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
66+
domain Resources served by Routing Peers running versions `0.59.0` to `0.59.9` in case when all the Peers in the
67+
NetBird organization are running versions `0.59.0` or newer.
68+
69+
Installing client in versions `<= 0.58.2` or `>= 0.59.2` or upgrading a Routing Peer to version `0.59.10+` will
70+
resolve this issue.
71+
</Note>
72+
73+
On a technical level the feature works as follows:
74+
75+
1. Initially (when NetBird connects) the operating system is instructed to use NetBird to resolve the requested
76+
domain(s). No routing rules are configured yet.
77+
2. An Application (could be a web browser) requests a domain `example.com` from the Operating System
78+
1. the Operating System requests a name from NetBird's Local DNS Forwarder, by default running on port `53` of:
79+
- for MacOS & Windows: the highest available IP address in your NetBird range, usually `100.xxx.255.254:53`
80+
- for other systems: local NetBird client's IP address, eg: `100.xxx.123.45`
81+
2. the Local DNS Forwarder forwards the query to Remote DNS Resolver running on Routing Peer's address
82+
and the following port:
83+
- `22054` for version `0.59.0` and newer
84+
- `5353` for versions below `0.58.x` and older
85+
3. the Routing Peer resolves the domain name using its local configuration (often independent of NetBird) and returns
86+
the result.
87+
4. the Local DNS Forwarder sets up routing rules for IP addresses returned from the query,
88+
before returning them to the Application
89+
- see [Trigger the Domain Resource](/how-to/troubleshooting-client#trigger-the-domain-resource)
90+
to observe this behaviour "in action".
91+
3. the Application receives the result "as usual", except for a slight delay before all of the above takes place the
92+
first time a domain name is requested,
93+
4. all subsequent requests to `example.com` will be served instantly from the Local DNS Forwarder's cache
94+
95+
<Note>
96+
NetBird tries its best to automatically open up DNS forwarder ports on Routing Peer's firewalls, but might fail on
97+
some system configurations and you might need to open up above 2 ports manually.
98+
99+
You can verify that firewall allows the DNS request in using following command issued from the clients device
100+
`nslookup -port=22054 <routed-domain> <routing-peer-ip>`, eg: `nslookup -port=22054 example.com 100.123.45.67`.
101+
102+
This is by far the most common cause of issues with domain Resources.
103+
</Note>
54104

55105
## Manage access to resources
56106

0 commit comments

Comments
 (0)