

Internet, DMZ & Internal network segments
.png)
 (1) (1) (1) (1) (1).png)
 (1) (1) (1) (1) (1) (1) (1) (1) (1).png)
 (1) (1) (1) (1) (1) (1).png)
 (1) (1) (1).png)
 (1) (1).png)
 (1) (1).png)
 (1) (1).png)
 (1) (1).png)
 (1) (1).png)

Example MFA Location configuration

MFA in Defguard desktop client

Attempting to use an MFA method that has not been enabled on the user's account.




Diagram showing how the components are deployed using the template

.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
| Your domain | CNAME response | Target component |
|---|---|---|
<YOUR_DEFGUARD_CORE_DOMAIN> | <InternalProxyALBDNSName> | Defguard Core (internal) |
<YOUR_DEFGUARD_PROXY_DOMAIN> | <PublicProxyALBDNSName> | Defguard Proxy (public) |
.png)


.png)
.png)
.png)
.png)
.png)

Adding a new location

Adding a new location

Location wizard

Location configuration

Manual configuration

Gateway server setup



ln -s /etc/nginx/sites-available/my-server.defguard.net.conf /etc/nginx/sites-enabled/my-server.defguard.net.conf
+
+systemctl start nginx.service
+
+
+To verify, run:
+
+```bash
+curl https://my-server.defguard.net/api/v1/health
+# Expected output:
+alive
+```
+
+{% hint style="info" %}
+If you use this simple setup and run all services on one server, you can use [NGINX access restrictions](https://docs.nginx.com/nginx/admin-guide/security-controls/controlling-access-proxied-tcp/) for securing core and allowing to access the _my-server.defguard.net_ only to selected networks - blocking the direct access from the Internet.
+{% endhint %}
+
+### Configuring and starting Nginx for Proxy service
+
+The Proxy service exposes APIs for enrollment, remote onboarding, and desktop client configuration.\
+Create its NGINX configuration file:
+
+`/etc/nginx/sites-available/enroll.defguard.net.conf`
+
+```nginx
+upstream defguard-proxy {
+ server 127.0.0.1:8080;
+}
+
+upstream proxy-grpc {
+ server 127.0.0.1:50051;
+}
+
+server {
+ listen 443 ssl http2;
+ server_name enroll.defguard.net;
+ access_log /var/log/nginx/enroll.log;
+ error_log /var/log/nginx/enroll.e.log;
+
+ ssl_certificate /etc/letsencrypt/live/enroll.defguard.net/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/enroll.defguard.net/privkey.pem;
+
+ client_max_body_size 200m;
+
+ location / {
+ proxy_http_version 1.1;
+ proxy_pass http://defguard-proxy;
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+ proxy_set_header X-Forwarded-Proto $scheme;
+ proxy_read_timeout 86400s;
+ proxy_send_timeout 86400s;
+ }
+}
+
+server {
+ listen 444 ssl http2;
+ server_name enroll.defguard.net;
+ access_log /var/log/nginx/enroll-grpc.log;
+ error_log /var/log/nginx/enroll-grpc.e.log;
+
+ ssl_certificate /etc/letsencrypt/live/enroll.defguard.net/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/enroll.defguard.net/privkey.pem;
+
+ client_max_body_size 200m;
+
+ location / {
+ grpc_pass grpc://proxy-grpc;
+ grpc_socket_keepalive on;
+ grpc_read_timeout 3000s;
+ grpc_send_timeout 3000s;
+ grpc_next_upstream_timeout 0;
+
+ proxy_request_buffering off;
+ proxy_buffering off;
+ proxy_connect_timeout 3000s;
+ proxy_send_timeout 3000s;
+ proxy_read_timeout 3000s;
+ proxy_socket_keepalive on;
+
+ keepalive_timeout 90s;
+ send_timeout 90s;
+
+ client_body_timeout 3000s;
+ }
+}
+```
+
+Enable and restart NGINX:
+
+```bash
+ln -s /etc/nginx/sites-available/enroll.defguard.net.conf /etc/nginx/sites-enabled/enroll.defguard.net.conf
+
+systemctl restart nginx.service
+```
+
+## Security Recommendations
+
+* Only expose **HTTPS ports (443)** for web access.
+* Do **not** expose internal **gRPC ports** (444, 50051, 50055) directly to the Internet.
+
+## Summary
+
+After completing the configuration:
+
+* Defguard Core is available at `https://my-server.defguard.net`
+* Enrollment and onboarding services are available at `https://enroll.defguard.net`
+* Both services are secured with SSL and reverse-proxied through NGINX.
diff --git a/deployment-strategies/gateway/running-gateway-on-mikrotik-routers.md b/deployment-strategies/running-gateway-on-mikrotik-routers.md
similarity index 93%
rename from deployment-strategies/gateway/running-gateway-on-mikrotik-routers.md
rename to deployment-strategies/running-gateway-on-mikrotik-routers.md
index 8e802b0..93fddfa 100644
--- a/deployment-strategies/gateway/running-gateway-on-mikrotik-routers.md
+++ b/deployment-strategies/running-gateway-on-mikrotik-routers.md
@@ -1,4 +1,4 @@
-# Running gateway on MikroTik routers
+# Running Gateway on MikroTik routers
By leveraging the ability of some MikroTik routers to run Docker containers, it is possible to deploy the gateway directly on your router.
@@ -9,9 +9,9 @@ Proceed with extra caution when working with your core infrastructure. All offic
{% hint style="danger" %}
Running the gateway on a MikroTik router is not fully supported.
-Due to custom RouterOS kernel incompatibility this kind of deployment does not support [Access Control List](../../admin-and-features/access-control-list/) functionality.
+Due to custom RouterOS kernel incompatibility this kind of deployment does not support [Access Control List](../features/access-control-list/) functionality.
-To run the gateway you must explicitly disable firewall management using the [`DEFGUARD_DISABLE_FW_MGMT` option](../../configuration.md#gateway-configuration).
+To run the gateway you must explicitly disable firewall management using the [`DEFGUARD_DISABLE_FW_MGMT` option](configuration.md#gateway-configuration).
{% endhint %}
## Prerequisites
@@ -19,7 +19,7 @@ To run the gateway you must explicitly disable firewall management using the [`D
* RouterOS device with ARM or ARM64 architecture (popular home lab choices include RB4011 or RB5009)
* `Container` package installed and enabled
* Running Defguard core instance with a WireGuard location configured
-* (optional) Self-signed certificate generated by following [gRPC SSL setup guide](../grpc-ssl-communication.md)
+* (optional) Self-signed certificate generated by following [gRPC SSL setup guide](grpc-ssl-communication.md)
## Setup
diff --git a/deployment-strategies/running-gateway-on-opnsense-firewall.md b/deployment-strategies/running-gateway-on-opnsense-firewall.md
new file mode 100644
index 0000000..88388ba
--- /dev/null
+++ b/deployment-strategies/running-gateway-on-opnsense-firewall.md
@@ -0,0 +1,48 @@
+# Running Gateway on OPNsense firewall
+
+## OPNsense plugin
+
+[OPNsense®](https://opnsense.org/) is an open source, feature rich firewall and routing platform, offering cutting-edge network protection.
+
+To start Defguard Gateway as OPNsense plugin:
+
+1. On the [release page](https://github.com/DefGuard/gateway/releases) find and download OPNsense package which will be named:\
+ `defguard-gateway_VERSION_x86_64-unknown-opnsense.pkg` – this package **includes both Defguard Gateway and OPNsense plugin.**
+2. Install the package:
+
+```bash
+pkg add defguard-gateway_VERSION_x86_64-unknown-opnsense.pkg
+```
+
+3. Refresh your OPNsense UI by running command below:
+
+```bash
+opnsense-patch
+```
+
+4. Go to your OPNsense UI and navigate to **VPN** > **Defguard Gateway**.
+
+
| OS distribution | OS architecture | Release artifact naming convention |
|---|---|---|
| Debian/Ubuntu | x86 | defguard-X.Y.Z-x86_64-unknown-linux-gnu.deb |
| Fedora/Red Hat Linux/SUSE | x86 | defguard-X.Y.Z-x86_64-unknown-linux-gnu.rpm |
| FreeBSD | x86 | defguard-X.Y.Z_x86_64-unknown-freebsd.pkg |
# on Debian/Ubuntu
+sudo dpkg -i <path_to_package>/defguard-X.Y.Z-x86_64-unknown-linux-gnu.deb
+
+# on Fedora/Red Hat Linux/SUSE
+sudo rpm -i <path_to_rpm_package>/defguard-X.Y.Z-x86_64-unknown-linux-gnu.rpm
-```
-dpkg -i defguard-0.11.0-x86_64-unknown-linux-gnu.deb
-```
+# FreeBSD
+pkg add <path_to_txz_package>/defguard-X.Y.Z_x86_64-unknown-freebsd.pkg
+
You can check is core installed properly:
@@ -135,12 +106,18 @@ You can check is core installed properly:
defguard 0.11.0
```
-### Gateway service
+### Gateway
-Navigate to [gateway repository release](https://github.com/DefGuard/gateway/releases) and choose version of core package that you want to obtain that has debian package and then swap `| OS discibution | OS architecture | Release artifact naming convention |
|---|---|---|
| Debian/Ubuntu | x86 | defguard-gateway_X.Y.Z_x86_64-unknown-linux-gnu.deb |
| Debian/Ubuntu | ARM | defguard-gateway_X.Y.Z_aarch64-unknown-linux-gnu.deb |
| Fedora/Red Hat Linux/SUSE | x86 | defguard-gateway_X.Y.Z_x86_64-unknown-linux-gnu.rpm |
| FreeBSD | x86 | defguard-gateway_X.Y.Z_x86_64-unknown-freebsd.pkg |
| OS discibution | OS architecture | Release artifact naming convention |
|---|---|---|
| Debian/Ubuntu | x86 | defguard-proxy-X.Y.Z-x86_64-unknown-linux-gnu.deb |
| Fedora/Red Hat Linux/SUSE | x86 | defguard-proxy-X.Y.Z-x86_64-unknown-linux-gnu.rpm |

Location wizard

Location configuration

Manual configuration

Gateway server setup
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
 (1) (1).png)
.png)
.png)
Rule context menu
.png)
Rule context menu
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
ACL alias list
.png)
ACL alias list
.png)
Alias creation form
.png)
Alias creation form
.png)
.png)
.png)
You cannot delete aliases used by ACL rules
.png)
You cannot delete aliases used by ACL rules
.png)
ACL rule Destination section with Aliases field
.png)
ACL rule Destination section with Aliases field
 (1).png)
Alias select modal
.png)
Alias select modal
.png)
.png)
.png)
SSH component alias definition
.png)
SSH component alias definition
.png)
Postgres server destination alias
.png)
Postgres server destination alias

Activity log page
.png)
Activity log page
.png)
Event filter modal
.png)
Event filter modal
.png)
Time range filter modal
.png)
Time range filter modal
.png)
.png)
.png)
.png)
.png)
.png)
| Name | Example value | Required | Logstash related configuration | Description |
|---|---|---|---|---|
| Name | Logstash | true | Assigned name for the destination. | |
| Url | http(s)://127.0.0.1:8002 | true | host, port | Address of running vector HTTP source. |
| Username | logstash | false | user | username for Basic Authentication |
| Password | strongPassword | false | password | password for Basic Authentication |
| Cert | contents of cert.pem | false | ssl_certificate | Used for TLS connection |
| Name | Example value | Required | Logstash related configuration | Description |
|---|---|---|---|---|
| Name | Logstash | true | Assigned name for the destination. | |
| Url | http(s)://127.0.0.1:8002 | true | host, port | Address of running logstash HTTP source. |
| Username | logstash | false | user | username for Basic Authentication |
| Password | strongPassword | false | password | password for Basic Authentication |
| Cert | contents of cert.pem | false | ssl_certificate | Used for TLS connection |
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)

.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)

 (1) (1) (1) (1).png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
 (1).png)
.png)
 (1).png)
.png)
 (1).png)
.png)
.png)
.png)
 (1) (1).png)
 (1) (1) (1).png)
.png)
.png)








.png)
.png)
.png)
.png)
.png)





.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
 (1) (1) (1).png)
.png)
.png)
.png)
button.
+Make sure you selected "Enable LDAP integration" as without it, the two-way synchronization won't work. After you fill out all the fields, test your configuration using the
button.
The LDAP two-way synchronization has the following options available:
-.png)
.png)
.png)
.png)
+4. Enable the LDAP integration in the settings
5. Now, the next two-way synchronization will remove all users from Defguard who have the synchronization group you just assigned in Defguard but don't have it in LDAP, effectively leaving you only with users that have the group in both sources.
## Synchronization mechanism overview
diff --git a/admin-and-features/network-devices.md b/features/network-devices.md
similarity index 83%
rename from admin-and-features/network-devices.md
rename to features/network-devices.md
index 917c01d..a140dd3 100644
--- a/admin-and-features/network-devices.md
+++ b/features/network-devices.md
@@ -1,6 +1,6 @@
# Network devices
-Network devices are like regular user devices but can only be managed by admins and have access to only one network. They are designed to be used with the [Defguard CLI client](../../help/cli-client.md).
+Network devices are like regular user devices but can only be managed by admins and have access to only one network. They are designed to be used with the [Defguard CLI client](../using-defguard-for-end-users/cli-client.md).
### Adding a new network device
@@ -8,14 +8,14 @@ In order to add a new network device, navigate to the network device menu (selec
While in the network device menu, click the "Add new" button. You will be presented with a popup prompting you to select your method of setting up the network device.
-* **Defguard Command Line Client -** choose it to automatically configure your device with the [Defguard CLI client](../../help/cli-client.md)
+* **Defguard Command Line Client -** choose it to automatically configure your device with the [Defguard CLI client](../using-defguard-for-end-users/cli-client.md)
* **Manual WireGuard Client** - choose it if you don't want to use the Defguard CLI client. You will need to configure your network device manually with a WireGuard config file.
#### Using the Defguard CLI client
After selecting the first option you will be presented with the initial setup screen.
-.png)
.png)
.png)
.png)
.png)
.png)
 (1) (1) (1) (1) (1) (1) (1).png)
.png)
.png)
.png)
.png)
.png)
 (1) (1) (1) (1).png)
.png)
 (1) (1).png)
.png)
 (1) (1).png)
.png)
 (1) (1) (1) (1).png)
.png)
 (1) (1) (1) (1) (1).png)
.png)
 (1) (1) (1) (1).png)
.png)
 (1).png)
.png)
.png)
.png)
.png)





{% endhint %}
The specific API endpoint used for this is `/api/v1/ssh_authorized_keys`. It returns a list of public keys, each in a new line. It allows you to filter you query by specifying a username, a group or a combination of both.
diff --git a/user-snat-bindings.md b/features/user-snat-bindings.md
similarity index 93%
rename from user-snat-bindings.md
rename to features/user-snat-bindings.md
index 1e6f4dd..e2ed3cd 100644
--- a/user-snat-bindings.md
+++ b/features/user-snat-bindings.md
@@ -1,7 +1,7 @@
# User SNAT bindings
{% hint style="warning" %}
-This is an enterprise feature. To use it, purchase our [enterprise license](enterprise/license.md) or ensure that your deployment does not exceed the [usage limits](enterprise/license.md#enterprise-is-free-up-to-certain-limits).
+This is an enterprise feature. To use it, purchase our [enterprise license](../enterprise/license.md) or ensure that your deployment does not exceed the [usage limits](../enterprise/license.md#enterprise-is-free-up-to-certain-limits).
{% endhint %}
{% hint style="info" %}
diff --git a/admin-and-features/wireguard/README.md b/features/wireguard/README.md
similarity index 100%
rename from admin-and-features/wireguard/README.md
rename to features/wireguard/README.md
diff --git a/admin-and-features/wireguard/behavior-customization.md b/features/wireguard/behavior-customization.md
similarity index 93%
rename from admin-and-features/wireguard/behavior-customization.md
rename to features/wireguard/behavior-customization.md
index f18ef9d..c00e5f3 100644
--- a/admin-and-features/wireguard/behavior-customization.md
+++ b/features/wireguard/behavior-customization.md
@@ -6,7 +6,7 @@ This is an enterprise feature. To use it, purchase our [enterprise license](../.
After purchasing the Enterprise License the _Enterprise features_ **tab will be activated**, enabling the administrator to configure additional features:
-
Additional Enterprise Features










MFA in Defguard desktop client

 (1) (1) (1) (1) (1) (1) (1) (1) (1) (1).png)
.png)
 (1) (1) (1) (1).png)
.png)
 (1) (1) (1) (1).png)
.png)
.png)
.png)
.png)
.png)
200 - Gateway is working and is connected to CORE
-
-* ```
- 503 - gateway works but is not connected to CORE
- ```
-
-By default no healthcheck ports are open.
diff --git a/help/mobile-client/README.md b/help/mobile-client/README.md
deleted file mode 100644
index 9ab58ad..0000000
--- a/help/mobile-client/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Mobile Client
-
-{% hint style="warning" %}
-Mobile client is currently under development and are in **beta**, current page should be considered as preview. Some parts of UI may look different in upcoming release.
-{% endhint %}
-
-### Installation
-
-1. Join closed beta for [iOS](https://testflight.apple.com/join/Jvdhkt7h) or [Android](https://play.google.com/store/apps/details?id=net.defguard.mobile).
-2. Download and install the app on your device.
-
-### Guides
-
-These guides explains how to use the Defguard Mobile to connect securely to VPN locations within your Defguard instance. It covers the entire process, from installation, adding new instances, connecting to locations, to managing your VPN connection settings.
-
-* [Instance adding guide](instance-adding.md#adding-instance-during-enrollment)
-* [Connecting to Instance guide](instance-connect.md#connecting-to-instance)
-* [Managing Instance guide](instance-manage.md#managing-your-instance)
diff --git a/in-depth/Untitled Diagram.drawio b/in-depth/Untitled Diagram.drawio
deleted file mode 100644
index 0ce3163..0000000
--- a/in-depth/Untitled Diagram.drawio
+++ /dev/null
@@ -1,79 +0,0 @@
-
Defguard architecture
.png)


.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)

Defguard live status of WireGuard VPN gateway
.png)

Adding a new device/desktop client in Defguard user profile
.png)

Defguard supports both desktop client and configuring any WireGuard Client
.png)

Configuring the client with a new instance


Naming your device


Client after successfully adding a new instance


Defguard showing the newly configured client in user profile


Nice statistics in Defguard client


Defguard VPN dashboard


Choosing to forward all traffic through VPN
.png)







"Check for updates" setting


New Desktop Client version available for download
 (1) (1) (1).png)






.png)
 (1).png)



































* **Predefined traffic** will only route traffic specified by your administrator.
* **All traffic** will route everything through VPN tunnel.
@@ -22,49 +24,45 @@ The first time you connect, app will ask whether you want to route **predefined
You can select **Remember my choice** if you don't want to be asked again.
If you want to change your traffic routing method after your first connection go to [this article](instance-manage.md#changing-traffic-routing-method-after-first-connection)
-
-
{% endhint %}
4. Choose your routing method
5. Confirm
+
{% hint style="warning" %}
Your phone will need to add new VPN configuration, you will see popup like this:
-
Please click **Allow**, without this permission, Defguard cannot establish VPN connection.
{% endhint %}
-
{% hint style="info" %}
If your location does not use MFA, your VPN connection should be established immediately after confirming your routing method.
{% endhint %}
-
{% hint style="info" %}
Some VPN locations require extra security when connecting. This is called MFA (Multi-Factor Authentication). There are two types:
* Internal MFA: You confirm your identity directly in the app, for example by entering a code from your Authenticator App or email.
* External MFA: You are redirected to a secure login page (like Google or Microsoft) outside the app to confirm your identity.
-
{% endhint %}
-
{% hint style="warning" %}
-If your location is using MFA please go to [section 3.2 "Connecting to location with MFA](#connecting-to-location-with-mfa)
+If your location is using MFA please go to [section 3.2 "Connecting to location with MFA](instance-connect.md#connecting-to-location-with-mfa)
{% endhint %}
-
-### Connecting to location with MFA
+## Connecting to location with MFA
1. Open Defguard
2. Go to **Instances** and click **Connect** next to location you want to use.
-


* **Predefined traffic** will only route traffic specified by your administrator.
* **All traffic** will route everything through VPN tunnel.
@@ -72,59 +70,54 @@ The first time you connect, app will ask whether you want to route **predefined
You can select **Remember my choice** if you don't want to be asked again.
If you want to change your traffic routing method after your first connection go to [this article](instance-manage.md#changing-traffic-routing-method-after-first-connection)
-
-
{% endhint %}
-3. Choose your routing method, and confirm.
-Depending on your location settings you will need to authenticate with [external](#external-mfa) or [internal](#internal-mfa) MFA.
+3. Choose your routing method, and confirm.
+Depending on your location settings you will need to authenticate with [external](instance-connect.md#external-mfa) or [internal](instance-connect.md#internal-mfa) MFA.
-#### External MFA
+### External MFA
If the VPN location requires OpenID for authentication (external MFA) you will see screen like this:
-











.png)


.png)

