omv8:omv8_plugins:wireguard

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
omv8:omv8_plugins:wireguard [2025/12/31 08:43] – [Update DuckDNS IP, receive notifications only when it changes, and restart the tunnel if needed] chenteomv8:omv8_plugins:wireguard [2025/12/31 08:57] (current) – [Update DuckDNS IP, receive notifications only when it changes, and restart the tunnel if needed] chente
Line 564: Line 564:
 Useful for securing persistent connections between servers, e.g., for backups. Useful for securing persistent connections between servers, e.g., for backups.
  
-WireGuard tunnel naming in OMV-extras plugin+**WireGuard tunnel naming in OMV-extras plugin**
  
   * Standard tunnels:   * Standard tunnels:
-    * Tunnel 1 → ''wgnet1'' +    * Tunnel number 1 → ''wgnet1'' 
-    * Tunnel 2 → ''wgnet2'' +    * Tunnel number 2 → ''wgnet2''
-    * Tunnel 3 → ''wgnet3''+
   * Custom tunnels:   * Custom tunnels:
     * The plugin automatically prefixes the name with ''wgnet_''.     * The plugin automatically prefixes the name with ''wgnet_''.
Line 576: Line 575:
  
 Summary: Summary:
-  * Standard: ''wgnet1'', ''wgnet2'', ''wgnet3''+  * Standard: ''wgnet1'', ''wgnet2''
   * Custom: ''wgnet_<your_custom_name>''   * Custom: ''wgnet_<your_custom_name>''
  
 Important: The TUNNELS variable in the scheduled task script must use these internal names to correctly check and reactivate the interfaces. Important: The TUNNELS variable in the scheduled task script must use these internal names to correctly check and reactivate the interfaces.
  
-Script example:+**Script example:**
  
 <html><body><pre><code> <html><body><pre><code>
Line 589: Line 588:
 UPDATED=0 UPDATED=0
  
 +# Update IP address in DuckDNS
 curl -s -k "https://www.duckdns.org/update?domains=${DOMAIN}&token=${TOKEN}&ip=&verbose=true" | grep -q UPDATED && { curl -s -k "https://www.duckdns.org/update?domains=${DOMAIN}&token=${TOKEN}&ip=&verbose=true" | grep -q UPDATED && {
     echo "IP updated in DuckDNS"     echo "IP updated in DuckDNS"
Line 594: Line 594:
 } }
  
 +# Check tunnel status and reactivate if needed
 for TUNNEL in $TUNNELS; do for TUNNEL in $TUNNELS; do
     ip link show "$TUNNEL" >/dev/null 2>&1 || {     ip link show "$TUNNEL" >/dev/null 2>&1 || {
Line 605: Line 606:
 </code></pre></body></html> </code></pre></body></html>
  
-How to use:+**How to use:**
   * Replace placeholders with your real values:   * Replace placeholders with your real values:
     * [MY_DOMAIN] = Your DuckDNS domain (without .duckdns.org)     * [MY_DOMAIN] = Your DuckDNS domain (without .duckdns.org)
Line 614: Line 615:
   * Enable OMV notifications to receive alerts when the public IP changes or a tunnel is reactivated.   * Enable OMV notifications to receive alerts when the public IP changes or a tunnel is reactivated.
   * Add a descriptive label to your scheduled task.   * Add a descriptive label to your scheduled task.
-  * Make sure curl is installed before running the task.+  * Make sure **curl** is installed before running the task.
  
 ---- ----
  • omv8/omv8_plugins/wireguard.1767170636.txt.gz
  • Last modified: 2025/12/31 08:43
  • by chente