Wireguard

Started by EASC Support, December 19, 2024, 03:57:52 AM

Previous topic - Next topic
Hello everyone. I hope someone has an answer for me. I have set up wireguard and it is working flowlessly. Almost. I am trying to find a way to deactivate the tunnel when a user logs off or shuts down their computer. I need it to be a concious decision wheher or not to connect and right now if user A logs off and does not deactivate it User B has an open tunnel as soon as they log in. Not ideal for my scenario.

Thank

What exactly do you see its not deactivated? Provide a picture.

If this is RA, each peer has its "own tunnel" if the Device using this tunnel is not active it goes down.
The only thing that stays UP constantly is the WG interface on the OPNsense side, which should stay UP otherwise you will not be able to establish tunnels.

Regards,
S.
Networking is love. You may hate it, but in the end, you always come back to it.

OPNSense HW
APU2D2 - deceased
N5105 - i226-V | Patriot 2x8G 3200 DDR4 | L 790 512G - VM HA(SOON)
N100   - i226-V | Crucial 16G  4800 DDR5 | S 980 500G - PROD

So if I activate the connection every thing is great
If I log off or shut down when I go back on it is still activated (Connected)

That is not a desirable behavior. I want the user to have to consciously activate (Connect) to the vpn when they log on. There are times when they will need to be on the vpn and times they should not be on the vpn. That is why when the need to be on I want them to have to connect every time.

I don't think you can achieve this with WireGuard. It is designed to be "always on" with the peer simply needing a new handshake to initiate/continue transmitting data. You could have a look at the whitepaper and technical details for the proper explanations link

If you want to have proactive login into the VPN rather then reactive, this is on users to do. The users should not set the WG client on their device to startup with OS boot.

Regards,
S.
Networking is love. You may hate it, but in the end, you always come back to it.

OPNSense HW
APU2D2 - deceased
N5105 - i226-V | Patriot 2x8G 3200 DDR4 | L 790 512G - VM HA(SOON)
N100   - i226-V | Crucial 16G  4800 DDR5 | S 980 500G - PROD