Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - knn28

#1
I found this thread when searching for a solution for the exact same issue.

Based on the newwanip hint in the thread you linked, I cowboyed this solution together by adding the following 2 functions to /usr/local/etc/inc/plugins.inc.d/wireguard.inc.

It seems to work.

function wireguard_configure()
{
    return [
        'newwanip' => ['wireguard_configure_do'],
    ];
}

function wireguard_configure_do()
{
    mwexec("/usr/local/sbin/configctl -dq wireguard restart");
}


On WAN interface DHCP renew -

Quote2023-08-28T14:11:22   Notice   kernel   <6>wg2: link state changed to UP   
2023-08-28T14:11:19   Notice   kernel   <6>wg1: link state changed to UP   
2023-08-28T14:11:19   Notice   kernel   <6>wg0: changing name to 'wg1'   
2023-08-28T14:11:19   Notice   kernel   <6>wg2: link state changed to DOWN   
2023-08-28T14:11:19   Notice   kernel   <6>wg1: link state changed to DOWN   
2023-08-28T14:11:19   Notice   opnsense   /usr/local/etc/rc.newwanip: plugins_configure newwanip (execute task : wireguard_configure_do())

Thanks for helping me find the original thread! I hope this helps you.