1
23.7 Legacy Series / Re: Mullvad WG Tunnels Loop Detected
« on: November 11, 2023, 05:29:51 pm »
Hi, I have same problem - so I use monit to solve it.
1. You need to know internal id's for wireguard interfaces
just execute :
2. Configure monit
2.1 Go to Service-Monit-Settings
tab "Service Tests Settings"
add new ("+" button)
name: TEST_NAME_1
condition: content = "wg1: loop detected"
action: Restart
Save-Apply
2.2 tab "Service Settings"
add new ("+" button)
check "enabled"
name: TEST_SERVICE_1
type: File
path: /var/log/system/latest.log
Start: /bin/sh -c '/usr/local/sbin/pluginctl -s wireguard start xxxx-xx-tt-yy-uuuuuuu'
Stop: /bin/sh -c '/usr/local/sbin/pluginctl -s wireguard stop xxxx-xx-tt-yy-uuuuuuu'
TESTS: TEST_NAME_1 (from step 2.1)
Save-Apply
2.3 Enable monit on tab "General Settings" (if not enabled yet)
Check monit Status page for it is up and running
3. If you have more than one wg interface - repeat steps 2.1, 2.2 with appropriate id changes and wg interface name changes.
1. You need to know internal id's for wireguard interfaces
just execute :
Code: [Select]
/usr/local/sbin/pluginctl -S wireguard
you will receive somethinh like this:Code: [Select]
[
{
"description": "Wireguard wg0",
"configd": {
"start": [
"wireguard start xxxx-xx-tt-yy-uuuuuuu"
],
"restart": [
"wireguard restart xxxx-xx-tt-yy-uuuuuuu"
],
"stop": [
"wireguard stop xxxx-xx-tt-yy-uuuuuuu"
]
},
"nocheck": true,
"id": "xxxx-xx-tt-yy-uuuuuuu",
"name": "wireguard",
"status": "wireguard[xxxx-xx-tt-yy-uuuuuuu] is running."
}
]
That Code: [Select]
xxxx-xx-tt-yy-uuuuuuu
is internal id.2. Configure monit
2.1 Go to Service-Monit-Settings
tab "Service Tests Settings"
add new ("+" button)
name: TEST_NAME_1
condition: content = "wg1: loop detected"
action: Restart
Save-Apply
2.2 tab "Service Settings"
add new ("+" button)
check "enabled"
name: TEST_SERVICE_1
type: File
path: /var/log/system/latest.log
Start: /bin/sh -c '/usr/local/sbin/pluginctl -s wireguard start xxxx-xx-tt-yy-uuuuuuu'
Stop: /bin/sh -c '/usr/local/sbin/pluginctl -s wireguard stop xxxx-xx-tt-yy-uuuuuuu'
TESTS: TEST_NAME_1 (from step 2.1)
Save-Apply
2.3 Enable monit on tab "General Settings" (if not enabled yet)
Check monit Status page for it is up and running
3. If you have more than one wg interface - repeat steps 2.1, 2.2 with appropriate id changes and wg interface name changes.