omv7:omv7_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
omv7:omv7_plugins:wireguard [2025/09/28 14:16] – [Installation] chenteomv7:omv7_plugins:wireguard [2025/12/31 06:39] (current) – [Update DuckDNS IP. Receive notifications only when it changes and restart WireGuard automatically] chente
Line 538: Line 538:
 ---- ----
  
-=== 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, if you are using a WireGuard tunnel between two servers and the public IP changes on one of them, the tunnel may drop connections (because it will still try to reach the old IP). Restarting the service automatically allows the peer to establish a new //handshake//, updating the tunnel with the new IP. 
- 
-Example command: 
- 
-<html><body><pre><code>curl -s -k "https://www.duckdns.org/update?domains=[MY_DOMAIN]&token=[MY_TOKEN]&ip=&verbose=true" | grep -q UPDATED && echo "UPDATED PUBLIC IP IN DUCKDNS" && systemctl restart wg-quick@wgnet_[MY_TUNNEL]</code></pre></body></html> 
- 
-  * Replace ''[MY_DOMAIN]'' with the subdomain you chose in "''[MY_DOMAIN]''.duckdns.org" and ''[MY_TOKEN]'' with your token. 
-  * Replace ''[MY_TUNNEL]'' with the name you assigned to your tunnel in the WireGuard plugin. 
-  * 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 ''curl'' if it is not installed on your system (see previous point). 
- 
----- 
  
 ===== Common Problems ===== ===== Common Problems =====
  • omv7/omv7_plugins/wireguard.1759068970.txt.gz
  • Last modified: 2025/09/28 14:16
  • by chente