mirror of
https://github.com/netbirdio/docs.git
synced 2026-04-18 16:36:35 +00:00
167 lines
6.2 KiB
Plaintext
167 lines
6.2 KiB
Plaintext
import {Note} from "@/components/mdx";
|
||
|
||
# How to Set up NetBird to Access Your Home Network
|
||
|
||
This step-by-step guide describes how to quickly get started with NetBird and access your home network remotely.
|
||
You will achieve a secure connection between your entire home network and NetBird, enabling remote devices to access
|
||
local network resources through a routing peer using the [NetBird Networks feature](/manage/networks/homelab/access-home-network).
|
||
|
||
## Download and Install NetBird
|
||
<br/>
|
||
|
||
<Button href="https://app.netbird.io/install" arrow="right" children="Download NetBird" />
|
||
|
||
## Connect Your Laptop
|
||
|
||
NetBird comes with a Desktop UI application that can be found in the systray. If it hasn't automatically started, look for `NetBird` in the application list, run it, and click `Connect`:
|
||
|
||
<p>
|
||
<img src="/docs-static/img/get-started/systray.png" alt="login-to-netbird" className="imagewrapper"/>
|
||
</p>
|
||
|
||
<Note>
|
||
Alternatively, you can run the `netbird up` command in the terminal.
|
||
</Note>
|
||
|
||
At this point a browser window pops up starting an interactive SSO login session that will register your laptop. You will be prompt to sign up and confirm your device registration:
|
||
|
||
<p>
|
||
<img src="/docs-static/img/manage/networks/homelab/access-home-network/login-screen-dark.png" alt="login-to-netbird" className="imagewrapper"/>
|
||
</p>
|
||
|
||
After the registration is complete, proceed to the [**NetBird dashboard**](https://app.netbird.io/) to confirm that your laptop is in the network. You will see it in the `Peers` view.
|
||
|
||
## Create a New NetBird Network
|
||
1. Go to the **Networks** tab in the side bar
|
||
2. Click **Add Network** and give it a name such as “Home LAN", and optionally add a description.
|
||
|
||
<p>
|
||
<img src="/docs-static/img/manage/networks/homelab/access-home-network/add-network-home-lan.png" alt="add-network-home-lan" className="imagewrapper"/>
|
||
</p>
|
||
|
||
## Identify Your Local Subnet
|
||
Use the steps below to quickly identify your local subnet for use as a Network Resource.
|
||
### Windows
|
||
1. Open **Command Prompt**.
|
||
2. Run:
|
||
```bash
|
||
ipconfig
|
||
```
|
||
3. Look for your active network adapter.
|
||
4. Note the values for:
|
||
- `IPv4 Address`
|
||
- `Subnet Mask`
|
||
Example:
|
||
```
|
||
IPv4 Address. . . . . . . . . . . : 192.168.1.10
|
||
Subnet Mask . . . . . . . . . . : 255.255.255.0
|
||
```
|
||
The subnet is `192.168.1.0/24`.
|
||
### Linux
|
||
1. Open **Terminal**.
|
||
2. Run:
|
||
```bash
|
||
ip -c a
|
||
```
|
||
or
|
||
```bash
|
||
ip route
|
||
```
|
||
3. Identify the active interface (e.g., `eth0`, `wlan0`) and note the IP with CIDR suffix:
|
||
Example:
|
||
```
|
||
inet 192.168.1.10/24
|
||
```
|
||
The subnet is `192.168.1.0/24`.
|
||
### macOS
|
||
1. Open **Terminal**.
|
||
2. Run:
|
||
```bash
|
||
ifconfig
|
||
```
|
||
3. Locate the active interface (`en0`, `en1`, etc.).
|
||
4. Look for:
|
||
- `inet` (IP address)
|
||
- `netmask` (in hex)
|
||
Example:
|
||
```
|
||
inet 192.168.1.10 netmask 0xffffff00
|
||
```
|
||
Hex `0xffffff00` = `255.255.255.0`, which is `/24`.
|
||
The subnet is `192.168.1.0/24`.
|
||
|
||
## Define Your LAN as a Network Resource
|
||
1. Click **Add Resource**.
|
||
2. Enter a name like "Home Subnet" and the CIDR of your home network into the Address field (e.g., 192.168.1.0/24).
|
||
3. Assign it to a Destination Group, create one called "home-lan" so you can write access policies using this group.
|
||
4. Click **Add Resource**.
|
||
|
||
<p>
|
||
<img src="/docs-static/img/manage/networks/homelab/access-home-network/add-resource-home-network.png" alt="add-resource-home-network" className="imagewrapper"/>
|
||
</p>
|
||
|
||
<Note>
|
||
Alternatively, if you do not want to allow access your entire home subnet, you can get more granular by only
|
||
allowing
|
||
access to a single static IP address for your added resource (e.g., 192.168.1.50/32).
|
||
</Note>
|
||
|
||
## Create an Access Control Policy
|
||
|
||
To allow access to resources in your home network, you need to create an access control policy that defines which
|
||
peers can access the network.
|
||
|
||
1. After adding your resource, click **Create Policy**.
|
||
2. Set Source to the group of NetBird peers you want to allow access (e.g., "All Users" or a specific group like "Home Users").
|
||
3. Set **Destination** to the "home-lan" group you made.
|
||
4. For **Protocol**, choose All.
|
||
5. Name it "Home LAN Access" and click **Add Policy**.
|
||
|
||
<p>
|
||
<img src="/docs-static/img/manage/networks/homelab/access-home-network/add-policy-home-lan.png" alt="add-policy-home-lan" className="imagewrapper"/>
|
||
</p>
|
||
|
||
## Add Your User to the Home User Group
|
||
|
||
In order to access your home network, you need to add your users to a group that is used in the access control policy,
|
||
you've previously created.
|
||
|
||
1. Go to the **Team** tab in the side bar.
|
||
2. Find your user row and click on the **GROUPS** column in the table.
|
||
3. Add "Home Users" by typing it in the input box and pressing Enter.
|
||
|
||
<p>
|
||
<img src="/docs-static/img/manage/networks/homelab/access-home-network/add-user-group.png" alt="add-network-home-lan" className="imagewrapper"/>
|
||
</p>
|
||
|
||
## Choose or Add a Routing Peer in Your LAN
|
||
|
||
1. Click **Add Routing Peer**.
|
||
2. Pick any always-on machine on your home network (Windows, Linux, Mac, Docker, Raspberry Pi).
|
||
3. Install the NetBird agent on it using a [one-off setup key](/manage/peers/register-machines-using-setup-keys#types-of-setup-keys) using the CLI installer.
|
||
4. Ensure this machine has access to both the internet and your LAN subnet.
|
||
5. Choose this machine as your routing peer and click **Continue** and **Add Routing Peer**.
|
||
|
||
<p>
|
||
<img src="/docs-static/img/manage/networks/homelab/access-home-network/add-routing-peer-home-network.png" alt="add-routing-peer-home-network"
|
||
className="imagewrapper"/>
|
||
</p>
|
||
|
||
<p>
|
||
<img src="/docs-static/img/manage/networks/homelab/access-home-network/add-routing-peer.png" alt="add-routing-peer-home-network"
|
||
className="imagewrapper"/>
|
||
</p>
|
||
|
||
## Test the Connection
|
||
|
||
1. Pick any IP within your Home LAN, such as the IP of your NAS, printer, or another service and run:
|
||
|
||
```bash
|
||
ping 192.168.x.x
|
||
```
|
||
|
||
2. A successful ping response confirms that your routing peer is correctly routing traffic to resources in your home network.
|
||
|
||
That’s it! You’ve successfully mapped your entire home LAN into a NetBird Network. Any peer included in your access policy
|
||
can now securely access resources in your home subnet via your designated routing peer, without the need to open router ports or install software on every device.
|