Skip to content

Commit a2d8513

Browse files
committed
feat: new page dedicated to Networks access management
1 parent ecba07f commit a2d8513

File tree

5 files changed

+99
-24
lines changed

5 files changed

+99
-24
lines changed

public/docs-static/img/how-to-guides/routing-peer-policies.drawio

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/26.1.1 Chrome/138.0.7204.100 Electron/37.2.2 Safari/537.36" version="26.1.1">
22
<diagram name="Page-1" id="cSO_DhjBtIs-y8T3Yu-b">
3-
<mxGraphModel dx="721" dy="1030" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="827" pageHeight="1169" background="#18181B" math="0" shadow="0">
3+
<mxGraphModel dx="1046" dy="1493" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="827" pageHeight="1169" background="#18181B" math="0" shadow="0">
44
<root>
55
<mxCell id="0" />
66
<mxCell id="1" parent="0" />
@@ -125,7 +125,7 @@
125125
<mxCell id="tk96eruObW772T1n_iph-25" value="100.XX.1.123" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=10;fontColor=#FFFFFF;" parent="1" vertex="1">
126126
<mxGeometry x="122" y="491.67" width="60" height="30" as="geometry" />
127127
</mxCell>
128-
<mxCell id="kU3IDCsIoFBLPOvx1m8k-9" value="" style="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image=data:image/svg+xml,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA4MCA1OCIgaGVpZ2h0PSI1OCIgd2lkdGg9IjgwIj4mI3hhOyAgICA8cmVjdCBoZWlnaHQ9IjUzIiB3aWR0aD0iNzUiIHk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kPSJNNDAuMTM0OCAxNS40MzM4TDM2LjIxOTcgMjIuMjNMNDIuMDIyMyAyOC4zOTc4TDQ1LjA5NzEgMjMuMDU5N0M0NC42MSAxOC44OTI5IDQyLjU4MjQgMTYuNjE3NCA0MC4xMzQ4IDE1LjQyNzciLz4mI3hhOzwvc3ZnPg==;fontColor=#FFFFFF;labelPosition=center;align=center;" parent="1" vertex="1">
129129
<mxGeometry x="126.19" y="454.24" width="51.62" height="37.43" as="geometry" />
130130
</mxCell>
131131
</root>
1.1 KB
Loading

src/components/NavigationDocs.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ export const docsNavigation = [
120120
isOpen: false,
121121
links: [
122122
{ title: 'Concept', href: '/how-to/networks' },
123+
{ title: 'Networks access management', href: '/how-to/networks-access-management'},
123124
{ title: 'Routing traffic to multiple IP resources', href: '/how-to/routing-traffic-to-multiple-resources' },
124125
{ title: 'Accessing restricted website domain resources', href: '/how-to/accessing-restricted-domain-resources' },
125126
{ title: 'Accessing entire domains within networks', href: '/how-to/accessing-entire-domains-within-networks' },
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# Networks access management
2+
3+
To manage access to and through the Routing Peers in Networks it is essential to understand that in the
4+
standard operating system networking model IP addresses assigned directly to the device are handled differently and
5+
independently of addresses behind it (aka routed/forwarded addresses).
6+
This currently also holds true in context of NetBird's Networks and Routing Peers access management:
7+
8+
- IP address attached directly to any of the client's local interfaces is NOT considered being routed/forwarded
9+
and is policed by the device's rules. In context of NetBird those are the Access Policies naming any of
10+
the Routing Peer's Groups as the destination:
11+
- this holds true especially when the address overlaps with the routed network's range,
12+
- all the other IP addresses from the network range are considered being routed/forwarded and are governed by separate
13+
set of rules. In NetBird context
14+
15+
## General rules
16+
17+
Here are some general rules resulting from above mechanism:
18+
19+
- access to **Resources** does not require access to the **Routing Peer** itself,
20+
- the Resource's Group needs to be mentioned in Access Policy's destination explicitly:
21+
- `All` Group does not cover Resources, unless it is explicitly assigned to those,
22+
- it is generally advised not to use the `All` group in the context of Networks,
23+
- access to the **Routing Peer**'s local IP address needs to be explicitly allowed:
24+
- granting access to Resource will establish connectivity to the Routing Peer (eg: in `netbird status -d`), but
25+
traffic destined to any of the Routing Peer's local IP addresses will be rejected,
26+
- the Resource policy can have completely different scope than the Routing Peer policy,
27+
- access to the Routing Peer is not limited by the Resource policies in any way,
28+
- it is possible to grant broader or more restricted access to the Routing Peer's IP address
29+
than to the rest of the routed network,
30+
- you can access _inactive_ Routing Peers on the same Network by their "local" IP addresses, because they are now
31+
effectively remote Resource,
32+
- domain-based (as opposed to subnet-based) Resources still resolve to and create routes for a set of one or
33+
more IP addresses (`/32` subnets), which in turn conform to the same rules and need to be planned accordingly:
34+
- if it happens to resolve to the IP address of the Routing Peer it will need to be allowed by a policy mentioning
35+
Routing Peers as destination,
36+
37+
## Visualising access
38+
39+
Following diagram explains the differences visually, it depicts:
40+
41+
- 1 User's laptop running NetBird client,
42+
- 3 Routing Peers running NetBird client,
43+
- a single LAN server, which does not run NetBird,
44+
- Network Resource routing the `192.168.1.0/24` network,
45+
- set of green dashed lines representing connections governed by the Access Policy
46+
granting access to the Resource,
47+
- set of orange solid lines representing connections governed by the Access Policy
48+
granting access directly to the Routing Peer,
49+
50+
<p>
51+
<img src="/docs-static/img/how-to-guides/routing-peer-policies.drawio.png" alt="routing-peer-policies" className="imagewrapper-big"/>
52+
</p>
53+
54+
55+
In practice, you might observe seemingly "random" results depending on which Peer is
56+
currently handling your requests.
57+
58+
### Example: access granted only to the Resource
59+
60+
Having a single policy allowing access to Resources, but not to the Routing Peer would result in following behaviors:
61+
62+
- connecting through `router-1` you will be able to access the`192.168.1.0/24` subnet
63+
except for a single IP `192.168.1.1`(Routing Peer's local address),
64+
- connecting through `router-2` you won't be able to access `192.168.1.2`,
65+
- connecting through `router-3` you won't be able to access `192.168.1.3`,
66+
67+
### Example: restrictive Resource access combined with permissive Routing Peer access
68+
69+
Having a Resource policy scoped to ICMP and a Routing Peer policy scoped to TCP 443 (HTTPS) would result in following
70+
behaviors:
71+
72+
- connecting through `router-1` you will be able to ping (and nothing else) the `192.168.1.0/24` subnet
73+
except for a single IP `192.168.1.1`. You will not be able to ping it, but instead you will be able to
74+
access all of HTTPS services running on this specific Routing Peer,
75+
- connecting through `router-2` you won't be able to ping `192.168.1.2`, but will be able to access HTTPS services,
76+
- connecting through `router-3` you won't be able to ping `192.168.1.3`, but will be able to access HTTPS services,
77+
78+
### Security caveats
79+
80+
Combining very restrictive Resource policies with broad Routing Peer policies might result in what some users
81+
would at the first glance consider security vulnerabilities.
82+
83+
This can be particularly unexpected when the Routing Peer is handling multiple subnets with different Groups or
84+
permission levels assigned. Granting access to the Routing Peer will grant access to all the services running
85+
on the Routing Peer itself for all the routed subnets, even if one (or all) of the subnets have very
86+
restrictive/harmless Resource policies in place:
87+
88+
- a potentially harmless Resource policy will make it advertised to the clients, without granting any meaningful access,
89+
- a permissive Routing Peer policy can grant _full_ access to the IP address from the routed network,
90+
91+
By combining above two policies seemingly unrelated policies and harmless policies,
92+
you can unexpectedly grant complete access to the Routing Peer's local IP address:
93+
94+
- if you omitted the Resource policy, the route would not be advertised and therefore never be allowed to pass through
95+
the WireGuard connection,
96+
- if you omitted the Routing Peer policy, you would not be able to access that single IP address at all,

src/pages/how-to/networks.mdx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -73,28 +73,6 @@ See the example below with a policy that allows the group `Berlin Office` to acc
7373
Policies for domains or wildcard domains applied to peers with IP ranges might influence access control for those peers, as their destination ranges include any IPs. Therefore, we recommend creating networks with routing peers dedicated to domain and wildcard domains to prevent unwanted access. In upcoming releases, we will provide a fix for this behavior.
7474
</Note>
7575

76-
### Managing access to and through the Routing Peers
77-
78-
Routing Peer's local IP address is managed in line with the standard Operating System network access management.
79-
Access to Resources accessible from _behind_ the Routing Peer is managed independently of the access to the services
80-
running _directly on_ the Routing Peer, even if the locally assigned IP address overlaps with the routed network range.
81-
82-
This means:
83-
- you might observe seemingly "random" results depending on which Peer is forwarding your requests,
84-
- access to **Resources** does not require access to the Routing Peer itself,
85-
- access to the Routing Peer's local IP address needs to be explicitly allowed:
86-
- granting access to Resource will establish connectivity to the Routing Peer (eg: in `netbird status -d`), but
87-
traffic destined to any of the Routing Peer's local IP addresses will be rejected,
88-
- you can access _inactive_ Routing Peers on the same Network by their "local" IP addresses, because they are now
89-
effectively remote,
90-
91-
Following diagram explains the differences visually with orange/green color denoting Access Policies governing
92-
the specific connections:
93-
94-
<p>
95-
<img src="/docs-static/img/how-to-guides/routing-peer-policies.drawio.png" alt="routing-peer-policies" className="imagewrapper-big"/>
96-
</p>
97-
9876
## Enable DNS wildcard routing
9977
When you configure wildcard domains as resources, you need to enable DNS wildcard routing. Which has an additional effect in comparison to the previous DNS routes behavior from Network routes; it switches the DNS resolution to the routing peer instead of the local client system.
10078
This is also useful for regular DNS routes when you want to resolve the domain names using the routing peer's IP infrastructure, which will allow for more restricted access control rules in newer versions of the clients (**1**) and for the traffic to go to a near routing peer service.

0 commit comments

Comments
 (0)