|
| 1 | +# OPNsense Installation |
| 2 | + |
| 3 | +The NetBird client (agent) allows a peer to join a pre-existing NetBird deployment. If a NetBird deployment is not yet available, |
| 4 | +there are both managed and [self-hosted](https://docs.netbird.io/selfhosted/selfhosted-quickstart) options available. |
| 5 | + |
| 6 | +<Note> |
| 7 | + The NetBird package is officially included starting from OPNsense `26.0`. At the time of writing, it is available via |
| 8 | + the `opnsense-devel` firmware (`26.1.a_83`) and will be part of the next stable release. |
| 9 | +</Note> |
| 10 | + |
| 11 | + |
| 12 | +## Prerequisites |
| 13 | +- Shell or Web UI access to your OPNsense system |
| 14 | +- A [setup key](/how-to/register-machines-using-setup-keys#types-of-setup-keys) to authenticate and register the OPNsense device |
| 15 | + |
| 16 | +## Installation |
| 17 | + |
| 18 | +1. **Log in to your OPNsense system** |
| 19 | + |
| 20 | + You can use the Web UI or SSH. |
| 21 | + |
| 22 | +2. **Install the NetBird package** |
| 23 | + |
| 24 | + In the OPNsense Web UI, navigate to `System` > `Firmware` > `Plugins`, and search for the `os-netbird` package. Click the install button next to it. |
| 25 | + |
| 26 | +3. **Verify the installation** |
| 27 | + |
| 28 | + Once installed, the NetBird configuration interface will be available under `VPN` > `NetBird` in the OPNsense menu |
| 29 | + |
| 30 | +## Configuration |
| 31 | + |
| 32 | +### Assign NetBird interface |
| 33 | +After installation, a new interface named `wt0` will be available but unassigned. To assign it go to `Interfaces` > |
| 34 | +`Assignments`. Under `Assign a new interface`, set the following values: |
| 35 | +- **Device**: `wt0` |
| 36 | +- **Description**: `NetBird` |
| 37 | + |
| 38 | +<p> |
| 39 | + <img src="/docs-static/img/how-to-guides/opnsense/interface_assignment.png" alt="interfaceAssignment" className="imagewrapper-big"/> |
| 40 | +</p> |
| 41 | + |
| 42 | +Click `Add` to assign the interface. |
| 43 | +<p> |
| 44 | + <img src="/docs-static/img/how-to-guides/opnsense/new_interface.png" alt="interfaceAssignment" className="imagewrapper-big"/> |
| 45 | +</p> |
| 46 | + |
| 47 | + |
| 48 | +### Enable the NetBird interface |
| 49 | +Now that the NetBird interface has been added, you need to enable it. Go to `Interfaces` > `[NetBird]`, then configure |
| 50 | +the following options and click `Save`, then `Apply changes` to activate the interface: |
| 51 | +- **Enable**: `✓ Enable Interface` |
| 52 | +- **Lock**: `✓ Prevent interface removal` |
| 53 | + |
| 54 | +<p> <img src="/docs-static/img/how-to-guides/opnsense/enable_interface.png" alt="enableInterface" className="imagewrapper-big"/> </p> |
| 55 | + |
| 56 | +<Note> |
| 57 | +OPNsense includes native WireGuard support, however do not configure or manage the NetBird interface (wt0) via the OPNsense WireGuard UI. |
| 58 | + NetBird fully manages the WireGuard interface and keys. |
| 59 | +</Note> |
| 60 | + |
| 61 | +### Configure Firewall Rules for the NetBird interface |
| 62 | +To allow NetBird to handle all access control, permit all traffic on the NetBird interface in OPNsense. |
| 63 | +This ensures traffic flows freely, while NetBird’s own policies (ACLs) govern the access restrictions. |
| 64 | + |
| 65 | +1. Navigate to `Firewall` > `Rules` > `NetBird`. |
| 66 | +2. Click `+ Add` to create a new rule. |
| 67 | +3. Configure the rule: |
| 68 | + - **Action**: `Pass` |
| 69 | + - **Interface**: `NetBird` |
| 70 | + - **Direction**: `in` |
| 71 | + - **TCP/IP Version**: `IPv4` |
| 72 | + - **Protocol**: `any` |
| 73 | + - **Source**: `any` |
| 74 | + - **Destination**: `any` |
| 75 | + - **Description**: `Allow all on NetBird (managed by NetBird)` |
| 76 | +4. Click `Save`, then `Apply changes`. |
| 77 | +5. Ensure this rule is at the top of the `NetBird` rules list so it isn’t shadowed by other rules. |
| 78 | + |
| 79 | +<p> |
| 80 | + <img src="/docs-static/img/how-to-guides/opnsense/firewall_rules.png" alt="firewallRules" className="imagewrapper-big"/> |
| 81 | +</p> |
| 82 | + |
| 83 | +### Authenticate the machine |
| 84 | + |
| 85 | +Fill out the authentication form with the following values and click `Save`: |
| 86 | + |
| 87 | +- **Management URL**: Default is `https://app.netbird.io:443`. If self-hosting, enter your custom management server URL. |
| 88 | +- **Setup Key**: Paste the setup key from your NetBird account. . |
| 89 | + |
| 90 | +<p> |
| 91 | + <img src="/docs-static/img/how-to-guides/opnsense/authentication.png" alt="authentication" className="imagewrapper-big"/> |
| 92 | +</p> |
| 93 | + |
| 94 | +### Verify Connection Status |
| 95 | + |
| 96 | +The Status page shows detailed information about connected peers and control services, helping you monitor your deployment. |
| 97 | +Access it via `VPN` > `NetBird` > `Status` in the OPNsense menu. |
| 98 | + |
| 99 | +Use this section for diagnostics and troubleshooting common connection or setup issues. |
| 100 | + |
| 101 | +<p> |
| 102 | + <img src="/docs-static/img/how-to-guides/opnsense/status.png" alt="connection status" className="imagewrapper-big"/> |
| 103 | +</p> |
| 104 | + |
| 105 | + |
| 106 | +## Get started |
| 107 | +<p float="center" > |
| 108 | + <Button name="button" className="button-5" onClick={() => window.open("https://netbird.io/pricing")}>Use NetBird</Button> |
| 109 | +</p> |
| 110 | + |
| 111 | +- Make sure to [star us on GitHub](https://github.com/netbirdio/netbird) |
| 112 | +- Follow us [on X](https://x.com/netbird) |
| 113 | +- Join our [Slack Channel](/slack-url) |
| 114 | +- NetBird [latest release](https://github.com/netbirdio/netbird/releases) on GitHub |
0 commit comments