Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| omv8:omv8_plugins:wireguard [2025/12/31 08:34] – [Update DuckDNS IP, receive notifications only when it changes, and restart the tunnel if needed] chente | omv8: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 → '' | + | * Tunnel |
| - | * Tunnel 2 → '' | + | * Tunnel |
| - | * Tunnel 3 → '' | + | |
| * Custom tunnels: | * Custom tunnels: | ||
| * The plugin automatically prefixes the name with '' | * The plugin automatically prefixes the name with '' | ||
| - | | + | |
| - | * Example: if you name it backup, its internal name will be '' | + | * Example: if you name it '' |
| Summary: | Summary: | ||
| - | * Standard: wgnet1, wgnet2, wgnet3 | + | * Standard: |
| - | * Custom: wgnet_< | + | * Custom: |
| 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:** | ||
| < | < | ||
| DOMAIN=" | DOMAIN=" | ||
| TOKEN=" | TOKEN=" | ||
| - | TUNNELS=" | + | TUNNELS=" |
| UPDATED=0 | UPDATED=0 | ||
| + | # Update IP address in DuckDNS | ||
| curl -s -k " | curl -s -k " | ||
| echo "IP updated in DuckDNS" | echo "IP updated in DuckDNS" | ||
| Line 592: | Line 594: | ||
| } | } | ||
| + | # Check tunnel status and reactivate if needed | ||
| for TUNNEL in $TUNNELS; do | for TUNNEL in $TUNNELS; do | ||
| ip link show " | ip link show " | ||
| Line 603: | Line 606: | ||
| </ | </ | ||
| - | Replace | + | **How to use:** |
| - | * [MY_DOMAIN] = Your DuckDNS domain (without | + | * Replace placeholders |
| - | * [MY_TOKEN] = Your DuckDNS token | + | * [MY_DOMAIN] = Your DuckDNS domain (without .duckdns.org) |
| - | * [MY_TUNNEL_NUMBER_1]=For standard tunnel number 1, write: '' | + | * [MY_TOKEN] = Your DuckDNS token |
| - | * [MY_TUNNEL_NUMBER_2]=For standard | + | * [MY_TUNNEL_NUMBER_1], |
| - | * [MY_CUSTOM_TUNNEL]=For custom tunnel abcd write: '' | + | * Single-line |
| - | + | * < | |
| - | Single-line | + | * Enable OMV notifications to receive alerts when the public IP changes |
| - | + | * Add a descriptive label to your scheduled task. | |
| - | | + | |
| - | + | ||
| - | < | + | |
| - | DOMAIN=" | + | |
| - | </ | + | |
| - | + | ||
| - | Notes: | + | |
| - | * Enable OMV notifications to receive alerts when the public IP changes. | + | |
| - | * Give a descriptive label to the scheduled task. | + | |
| * Make sure **curl** is installed before running the task. | * Make sure **curl** is installed before running the task. | ||