Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
omv7:omv7_plugins:wireguard [2024/02/17 17:36] – [Configuring a Client] chente | omv7:omv7_plugins:wireguard [2025/09/02 18:20] (current) – [Update DuckDNS IP. Receive notifications only when it changes and restart WireGuard automatically] chente | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{indexmenu_n> | ||
\\ | \\ | ||
< | < | ||
Line 19: | Line 20: | ||
* You will be able to access all your shared folders and all the services you have configured on your local network as if you were there. | * You will be able to access all your shared folders and all the services you have configured on your local network as if you were there. | ||
* By default all client traffic will be forwarded through the VPN connection (it is configurable), | * By default all client traffic will be forwarded through the VPN connection (it is configurable), | ||
- | * The Custom Config tab allows you to make configurations according to specific needs. You can implement any Wireguard network topology. | + | * The Custom Config tab allows you to make configurations according to specific needs. You can use this tab if you need to connect the server to an external Wireguard VPN service, or you can implement any Wireguard network topology. |
* The point-to-point connection allows the connection between two servers, communicating only with each other. For example to make remote backups. | * The point-to-point connection allows the connection between two servers, communicating only with each other. For example to make remote backups. | ||
* The site-to-site provides a connection between two networks so that any IP on a local network is able to communicate with any IP on another local network. | * The site-to-site provides a connection between two networks so that any IP on a local network is able to communicate with any IP on another local network. | ||
Line 46: | Line 47: | ||
In OMV7's GUI:\\ | In OMV7's GUI:\\ | ||
Under **System** > **Plugins**, | Under **System** > **Plugins**, | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | If your system is based on an < | ||
+ | To solve it you must reinstall the Armbian Kernel once the plugin is installed and everything will work normally. | ||
+ | </ | ||
---- | ---- | ||
Line 61: | Line 68: | ||
{{ : | {{ : | ||
* In the OMV GUI go to **Services** > **Wireguard** > **Tunnels** Press the **Create** button. | * In the OMV GUI go to **Services** > **Wireguard** > **Tunnels** Press the **Create** button. | ||
+ | * Press the **Enable** button to enable the tunnel. | ||
* **Basic Configuration** In the dialog box enable the tunnel and complete the following fields: | * **Basic Configuration** In the dialog box enable the tunnel and complete the following fields: | ||
* **Name** You can name the tunnel to identify it later. | * **Name** You can name the tunnel to identify it later. | ||
Line 147: | Line 155: | ||
* Click **Save**. At this point, if you have already activated the tunnel and the client, the connection will be up and running. | * Click **Save**. At this point, if you have already activated the tunnel and the client, the connection will be up and running. | ||
* By pressing the button **Client Config** you can see the client configuration file, you can copy and paste the text in a file to configure the connection in the client. If you do it this way, add the ending " | * By pressing the button **Client Config** you can see the client configuration file, you can copy and paste the text in a file to configure the connection in the client. If you do it this way, add the ending " | ||
- | * A QR will appear in the table (if the client is enabled), which you can scan from a smartphone to configure the connection without having to copy a file. If you need to send it you can take a photo. Treat this image as a password, it is the access key to your network. | + | * A QR will appear in the table (if the client is enabled), which you can scan from a smartphone to configure the connection without having to copy a file. If you need to send it you can take a photo. Treat this image as a password, it is the access key to your network. Press the " |
* Use a different client configuration for each client. If you configure the same connection on several clients at the same time, they will not be able to connect simultaneously. | * Use a different client configuration for each client. If you configure the same connection on several clients at the same time, they will not be able to connect simultaneously. | ||
Line 185: | Line 193: | ||
---- | ---- | ||
- | This tab allows you to create a tunnel with the custom settings you need. It allows to open an editing window where you can paste the configuration from a text file, therefore, you can choose the parameters you need for the tunnel. | + | This tab allows you to create a tunnel with the custom settings you need. It allows to open an editing window where you can paste the configuration from a text file, therefore, you can choose the parameters you need for the tunnel. Use this tab if you need to connect the server to an external (commercial) Wireguard VPN service. |
If you need to configure a tunnel to connect the point-to-point server with another server, or any other network topology, you must do so in this tab, since it allows you to manually define keys, networks and other necessary parameters. | If you need to configure a tunnel to connect the point-to-point server with another server, or any other network topology, you must do so in this tab, since it allows you to manually define keys, networks and other necessary parameters. | ||
Line 200: | Line 208: | ||
* In the **Config** field write the configuration content of your tunnel following the Wireguard rules. | * In the **Config** field write the configuration content of your tunnel following the Wireguard rules. | ||
* You can see how to do it on the [[https:// | * You can see how to do it on the [[https:// | ||
+ | * If you want to connect to a commercial VPN service, they will most likely provide you with the tunnel configuration template. In that case, simply copy and paste that template into the Config field. | ||
* If you need special topologies you can find them on the [[https:// | * If you need special topologies you can find them on the [[https:// | ||
* Note that the networks created by the plugin in the **Tunnel** and **Client** tabs are generated in the '' | * Note that the networks created by the plugin in the **Tunnel** and **Client** tabs are generated in the '' | ||
Line 509: | Line 518: | ||
* This will have installed the '' | * This will have installed the '' | ||
* Type the following command in the **Command** field of the dialog box. | * Type the following command in the **Command** field of the dialog box. | ||
- | < | + | < |
- | * Replace '' | + | * Replace '' |
- | * Replace '' | + | * Replace '' |
* In the **Time of execution** field, choose the Hourly option. | * In the **Time of execution** field, choose the Hourly option. | ||
* This will run the command every hour. If your IP changes frequently you can change this to run for shorter periods of time. Every 5 minutes may be reasonable. | * This will run the command every hour. If your IP changes frequently you can change this to run for shorter periods of time. Every 5 minutes may be reasonable. | ||
Line 525: | Line 534: | ||
This task will create a log file at / | This task will create a log file at / | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === Update DuckDNS IP. Receive notifications only when it changes and restart WireGuard automatically === | ||
+ | |||
+ | You can add this script to a scheduled task so that your public IP is updated, and you receive a notification only if it changes. | ||
+ | |||
+ | Additionally, | ||
+ | |||
+ | Example command: | ||
+ | |||
+ | < | ||
+ | |||
+ | * Replace '' | ||
+ | * Replace '' | ||
+ | * Remember to enable notifications in OMV to receive an alert when the public IP changes. | ||
+ | * Add a descriptive label to the scheduled task so you can easily identify it. | ||
+ | |||
+ | Once created, simply copy the command into **Scheduled Tasks** and set the execution interval. | ||
+ | |||
+ | Remember to install '' | ||
---- | ---- | ||
Line 564: | Line 594: | ||
---- | ---- | ||
+ | |||
+ | === I can't access some of my containers. MacVLAN. === | ||
+ | |||
+ | If you have containers configured using a MacVLAN network interface, you won't be able to access them using Wireguard. Containers with this configuration can't communicate with the host, so Wireguard can't access them either. This is a limitation of the Linux kernel. | ||
+ | |||
+ | There are workarounds, | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === I can access my LAN, but I don't have internet access. === | ||
+ | |||
+ | We've received reports of some Mac clients where the network remains split even with '' | ||
+ | |||
+ | Try adding a generic DNS to your Wireguard tunnel on the client. Something like '' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
===== Source Code ===== | ===== Source Code ===== | ||