diff --git a/public/docs-static/img/architecture/high-level-dia.png b/public/docs-static/img/architecture/high-level-dia.png index 71066048..8b8d0748 100644 Binary files a/public/docs-static/img/architecture/high-level-dia.png and b/public/docs-static/img/architecture/high-level-dia.png differ diff --git a/public/docs-static/img/architecture/management.png b/public/docs-static/img/architecture/management.png index 3b22aedf..f4e5923e 100644 Binary files a/public/docs-static/img/architecture/management.png and b/public/docs-static/img/architecture/management.png differ diff --git a/public/docs-static/img/architecture/mesh.png b/public/docs-static/img/architecture/mesh.png index 12ac5292..27bab4c9 100644 Binary files a/public/docs-static/img/architecture/mesh.png and b/public/docs-static/img/architecture/mesh.png differ diff --git a/public/docs-static/img/architecture/relay.png b/public/docs-static/img/architecture/relay.png index c95d503e..10b90d92 100644 Binary files a/public/docs-static/img/architecture/relay.png and b/public/docs-static/img/architecture/relay.png differ diff --git a/public/docs-static/img/architecture/signal.png b/public/docs-static/img/architecture/signal.png index 4c575029..36c7ce46 100644 Binary files a/public/docs-static/img/architecture/signal.png and b/public/docs-static/img/architecture/signal.png differ diff --git a/src/pages/about-netbird/how-netbird-works.mdx b/src/pages/about-netbird/how-netbird-works.mdx index d7b7a556..1295709c 100644 --- a/src/pages/about-netbird/how-netbird-works.mdx +++ b/src/pages/about-netbird/how-netbird-works.mdx @@ -5,42 +5,46 @@ export const title = 'How NetBird Works' ## Architecture ### Overview -NetBird is an open source platform consisting of a collection of components, responsible for handling peer-to-peer connections, tunneling, authentication, and network management (IPs, keys, ACLs, etc). +NetBird is an open source platform consisting of a collection of components, responsible for handling peer-to-peer +connections, tunneling, authentication, and network management (IPs, keys, ACLs, etc). It uses open-source technologies like [WireGuard®](https://www.wireguard.com/), [Pion ICE (WebRTC)](https://github.com/pion/ice), [Coturn](https://github.com/coturn/coturn), -and [software](https://github.com/netbirdio/netbird) developed by NetBird authors to make secure private networks deployment and management simple. +and [software](https://github.com/netbirdio/netbird) developed by NetBird to make secure private networks deployment and management simple. NetBird relies on four components - **Client** application (or agent), **Management**, **Signal** and **Relay** services. -The combination of these elements ensures that direct point-to-point connections are established and only authenticated users (or machines) have access to the resources for which they are authorized. +The combination of these elements ensures that direct point-to-point connections are established and only authenticated +users (or machines) have access to the resources for which they are authorized. A **Peer** is a machine or any device that is connected to the network. -It can be a Linux server running in the cloud or on-premises, a personal laptop, or even a Raspberry PI. +It can be a Linux server running in the cloud or on-premises, a personal laptop, mobile phone, or even a Raspberry PI.
-With NetBird clients installed and authorized on the Management service, machines form a mesh network connecting to each other directly via an encrypted point-to-point Wireguard tunnel. +With NetBird clients installed and authorized on the Management service, machines form a mesh network connecting +to each other directly via an encrypted point-to-point WireGuard tunnel.
-While it is possible to create a full mesh network, it might be not a desirable outcome. In this case, [ACLs](/how-to/manage-network-access) can be utilized to limit the access to certain machines. +While it is possible to create a full mesh network, it might be not a desirable outcome. +In this case, [groups and access controls](/how-to/manage-network-access) can be utilized to limit the access to certain machines. Let's now take a closer look at each of NetBird's components. ### Management Service The Management service is the central coordination component for NetBird with a UI dashboard. -It keeps the network state, public Wireguard keys of the peers, authenticates and distributes network changes to peers. +It keeps the network state, public WireGuard keys of the peers, authenticates and distributes network changes to peers. The Management Service's responsibilities include: * **Registering and authenticating new peers.** Every new machine has to register itself in the network in order to connect to other machines. -After installation, NetBird client requires login that can be done through Identity Provider (IDP) or with a [setup key](/how-to/register-machines-using-setup-keys). -* **Keeping the network map.** The Management service stores information about all the registered peers including Wireguard public key that was sent during the registration process. +After installation, NetBird client requires login that can be done through Identity Provider (IDP) like Okta or with a [setup key](/how-to/register-machines-using-setup-keys). +* **Keeping the network map.** The Management service stores information about all the registered peers including WireGuard public key that was sent during the registration process. * **Managing private IP addresses.** Each peer receives a unique private IP with which it can be identified in the network. We use [Carrier Grade NAT](https://en.wikipedia.org/wiki/Carrier-grade_NAT) address space with an allocated address block 100.64.0.0/10. * **Synchronizing network changes to peers.** The Management Service keeps a control channel open to each peer sending network updates. @@ -49,7 +53,7 @@ After that, they are able to establish a connection to the new peer. * **Creating and managing access control rules.** * **Managing private DNS.** [DNS](/how-to/manage-dns-in-your-network) allows referring to each of the peers with a fully qualified domain name (FQDN). * **Logging network activity.** -* **Wireguard key rotation.** Coming Soon. +* **Managing users.** The Management service runs in the cloud NetBird-managed. It can also be self-hosted. @@ -65,14 +69,20 @@ Once installed and registered, a machine becomes a peer in the network. The Client's roles are the following: -* **Generating private and public Wireguard keys.** These keys are used for packet encryption between peers and for [Wireguard Cryptokey Routing](https://www.wireguard.com/#cryptokey-routing). -To accept the incoming connections, peers have to know each other, therefore, the generated public keys have to be pre-shared on the machines. The client application sends its public key to the Management service which then distributes it to the authorized peers. -* **Handling peer registration and authentication.** Each peer has to be authenticated and registered in the system. The client application requests a user to log in with an Identity Provider (IDP) or a [setup key](/how-to/register-machines-using-setup-keys) so that the peer can be associated with the organization's account. +* **Generating private and public WireGuard keys.** These keys are used for packet encryption between peers and for [WireGuard Cryptokey Routing](https://www.wireguard.com/#cryptokey-routing). +To accept the incoming connections, peers have to know each other, therefore, the generated public keys have to be pre-shared on the machines. +The client application sends its public key to the Management service which then distributes it to the authorized peers. +* **Handling peer registration and authentication.** Each peer has to be authenticated and registered in the system. +The client application requests a user to log in with an Identity Provider (IDP) or a [setup key](/how-to/register-machines-using-setup-keys) so that the peer can be associated with the organization's account. * **Receiving network updates from the Management service.** -Each peer receives initial configuration and a list of peers with corresponding public keys and IP addresses so that it can establish a peer-to-peer connection. -* **Establishing peer-to-peer Wireguard connection.** To establish a connection with a remote peer, the Client first discovers the most suitable connection candidate, or simply address (IP:port) that other peer can use to connect to it. +Each peer receives initial configuration and a list of peers with corresponding public keys and IP addresses so that it can establish a point-to-point connection. +* **Establishing point-to-point WireGuard connection.** To establish a connection with a remote peer, the Client first discovers the most suitable connection candidate, or simply address (IP:port) that other peer can use to connect to it. Then sends it to the remote peer via Signal. This message is encrypted with the peer's private key and a public key of the remote peer. -The remote peer does the same and once the peers can reach each other, they establish an encrypted Wireguard tunnel. +The remote peer does the same and once the peers can reach each other, they establish an encrypted WireGuard tunnel. +* **Applying access control policies.** The client application applies access control rules that are received from the Management service. +It uses system's available firewall manager like `nftables` to apply the rules. +* **Applying DNS settings.** The client application runs an [embedded DNS resolver](https://netbird.io/knowledge-hub/using-xdp-ebpf-to-share-default-dns-port-between-resolvers) and ensures that the machine can resolve other peers' FQDNs in the `netbird.cloud` namespaces. +It also applies other DNS settings that are received from the Management service.
@@ -92,7 +103,7 @@ This is done through Signal. After a connection has been established, Signal ste