Start WireGuard VPN with WireGuard add-on without UAC prompt
0 vote
Hi,
When I start a WireGuard VPN from the WireGuard add-on, I get a UAC prompt on VPN connect and disconnect.
Our users don't have local admin rights, it would be great if we could do this without UAC prompt/local admin rights needed.
If I start a VPN from the WireGuard client itself, there is no UAC prompt or local admin rights needed.
Kind regards,
Ray
Hello,
Thank you for the request. The reason for that is because we need to run Wireguard as administrator for it to be able to execute properly. With 2025.1 we're integrating GSudo, so using it for this might be a solution. We've opened a ticket.
Also as a note, even with GSudo, you will be prompted for the UAC at least once, but it has a cache to not reprompt for X amount of times afterwards.
Regards,
Hubert Mireault
Also, the command line we use in RDM is the following:
<PATH TO WIREGUARD>\wireguard.exe /installtunnelservice tunnelname.conf
The tunnelname.conf file is generated by RDM with the parameters given when in "Custom" mode, or point to the linked file when in "link to file" mode.
Because of the "installtunnelservice" switch, it should require the admin rights. Could you confirm if your users, running this same command with one of their configuration files, receive the UAC prompt or not? Maybe Wireguard updated and now it's not required anymore.
Regards,
Hubert Mireault
Hi,
I can't get this to work. If I try to run this from a command line in non admin mode, it just says access denied. If I try the same from an elevated command prompt then it works.
Hello,
Unfortunately as far as I know this is the only way we can establish the tunnel through the command line, and as you confirm, it requires being ran from an elevated prompt. This is what RDM does and the reason why you receive the UAC prompt.
Regards,
Hubert Mireault
Hi Hubert,
I agree, couldn't find anything else myself with a command line.
There are still options. I could start the VPN from the WireGuard gui. That works fine, no elevation needed.
Another option which works from RDM (sort of) is WireSock VPN client (www.wiresock.net). This is free for personal use, and not too expensive for business use.
You can start this without elevation from RDM by using the custom VPN option, point the client to wiresock-client.exe, and the start command to: run -config [config_full_path_name.conf] -log-level none.
I did say sort of. When you open the VPN, it opens a command prompt, stating that the service has been activated. You can't close it from within RDM (I think), but when you close the command prompt the VPN is disconnected. It's not pretty, but it works.
Finally the last option is to use OpenVPN, which doesn't have this problem at all. The UniFi routers support both VPN's. I just preferred WIreGuard because the connecting process is really quick, and OpenVPN takes some time.
I think, for now, I just use the WireGuard gui. If there aren't too many connections, that might be the most simple option. If there are getting too much connections, I can always switch to OpenVPN.
Thank you!
Kind regards,
Ray
Hello Ray,
Thank you for the feedback and for giving us more information as to the alternatives you're considering. For now, I'll consider this case closed, but if you have any other request, feel free to let us know and we'd be happy to try and find a solution.
Regards,
Hubert Mireault