How to find out about a new peer connection in wireguard?

From: Stephan von Krawczynski
Date: Sun May 05 2024 - 11:06:32 EST


Hello all,

since I cannot find any information about this pretty simple question I
thought I present it to a broader audience here.
Can anyone tell how one can find out that a new peer connection was just made
to a wireguard interface?
It is obvious that the wireguard hooks like PostUP are useless because they
have no relation to peer connections at all.
So how is some admin informed about a new peer connection - equally about a
peer connection that just changed endpoint IP? Does the kernel give any hint
about that?
Please feel free to cc me in your answer, as else it may be hard to find for
me. Thank you!

--
Regards,
Stephan