Skip to content

Commit 09f0fe4

Browse files
committed
OPNsense configuration
1 parent a4fea1a commit 09f0fe4

File tree

7 files changed

+63
-3
lines changed

7 files changed

+63
-3
lines changed

.gitbook/assets/OPNSense Plugin.png

-25.3 KB
Loading
13.3 KB
Loading
Loading
79.8 KB
Loading

admin-and-features/setting-up-your-instance/gateway/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,17 @@ If everything went well, Defguard Gateway should be connected to Defguard Core a
8080
8181
## OPNsense plugin
8282
83-
[OPNsense®](https://opnsense.org) is an open source, feature rich firewall and routing platform, offering cutting-edge network protection.
83+
[OPNsense®](https://opnsense.org/) is an open source, feature rich firewall and routing platform, offering cutting-edge network protection.
8484
8585
To start Defguard Gateway as OPNsense plugin:
8686
8787
1. On the [release page](https://github.com/DefGuard/gateway/releases) find and download OPNsense package which will be named: \
88-
`defguard-gateway_VERSION_x86_64-unknown-opnsense.pkg` this package **includes Defguard Gateway as well as OPNSense plugin.**
88+
`defguard-gateway_VERSION_x86_64-unknown-opnsense.pkg` this package **includes both Defguard Gateway and OPNsense plugin.**
8989
9090
2. Install the package:
9191
9292
```bash
93-
pkg add <path_to_txz_package>
93+
pkg add defguard-gateway_VERSION_x86_64-unknown-opnsense.pkg
9494
```
9595

9696
3. Refresh your OPNsense UI by running below command:
@@ -111,6 +111,8 @@ You can find detailed description of all fields [here](../../../features/setting
111111

112112
If everything went well, Defguard Gateway should be connected to Defguard Core and you can start [adding new devices to your network](../../../features/setting-up-your-instance/features/wireguard/adding-wireguard-devices.md).
113113

114+
See also: [how to configure Defguard in OPNsense](opnsense.md)
115+
114116
## Binary Install
115117

116118
1. Checkout Gateway releases [here](https://github.com/DefGuard/gateway/releases) and download compatible binary from GitHub page.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
icon: dungeon
3+
---
4+
5+
# OPNsense
6+
7+
[OPNsense®](https://opnsense.org/) is an open source, feature rich firewall and routing platform, offering cutting-edge network protection.
8+
9+
## Defguard Gateway Configuration
10+
11+
This instruction helps configuring Defguard Gateway in OPNsense. This is based on [WireGuard Road Warrior Setup](https://docs.opnsense.org/manual/how-tos/wireguard-client.html) from OPNsense documentation.
12+
13+
### Configure Defguard Gateway plugin
14+
15+
1. Go to **VPN → Defguard Gateway**
16+
2. Fill out the approriate values in the form
17+
3. Eventually, **Start/Restart** the service.
18+
19+
<figure><img src="../../../.gitbook/assets/OPNSense Plugin.png" alt="OPNSense plugin"><figcaption></figcaption></figure>
20+
21+
### Assign a network interface to Defguard
22+
23+
1. Go to **Interfaces → Assignments**
24+
2. Under **Assign a new interface**, select the Defgaurd Gateway network interface (e.g. _wg0_)
25+
3. Add a descrption, for example _ParisOfficeVPN_
26+
4. Click **Add**
27+
28+
<figure><img src="../../../.gitbook/assets/OPNSense-interface-assignments.png" alt="Interface Assignments"><figcaption></figcaption></figure>
29+
30+
5. Select the newly create interface by clicking on its name (in this example _[ParisOfficeVPN]_).
31+
6. Select **Enable Interface**
32+
7. Select **Prevent interface removal**
33+
8. Click **Save**, and then **Apply changes**
34+
35+
### Create an outbound NAT rule
36+
37+
1. Go to **Firewall → NAT → Outbound**
38+
2. Make sure the selected **Mode** is **Hybrid outbound NAT rule generation**; if it wasn't selected, click **Save** and then **Apply changes**
39+
3. Under **Manual rules**, add a new rule by clicking **+**.
40+
4. Select **Interface** – this should be either WAN or LAN, depending on the needs.
41+
5. Select **TCP/IP version** – either IPv4 or IPv6.
42+
6. Select **Source address** – this should be interface name assigned above plus _net_, e.g. _ParisOfficeVPN net_.
43+
7. Click **Save**, and then **Apply changes**
44+
45+
<figure><img src="../../../.gitbook/assets/OPNSense-outbound-nat-rule.png" alt="Outbound NAT rule"><figcaption></figcaption></figure>
46+
47+
### Add firewall rules to allow WireGuard traffic in
48+
49+
1. Go to **Firewall → Rules → WAN**
50+
2. Click **+** (plus) to add a new rule
51+
3. The rule should _Pass_ the traffic _in_ with _quick_ option enabled
52+
4. Select **WAN** interface
53+
5. Choose **TCP/IP version** of your desire
54+
6. Select **UDP** protocol.
55+
7. Set **Destination** to **WAN address** and port to the port number provided in Defaurd Core: _Location configuration → Gateway port_
56+
8. Click **Save**, and then **Apply changes**
57+
58+
<figure><img src="../../../.gitbook/assets/OPNSense-firewall-rule.png" alt="Firewall rule"><figcaption></figcaption></figure>

releases/.DS_Store

-6 KB
Binary file not shown.

0 commit comments

Comments
 (0)