r/WireGuard • u/Reverent • Mar 30 '20
[Solution] Managing Wireguard on Windows as a Non-Admin
So, this is an issue I have been struggling with for a while now, and I thought I would share the solution I have come up with.
Problem is that non-admin users cannot manage, start, or stop the wireguard VPN. This is an issue because if the wireguard server gets blocked (common for enterprise networks), suddenly there is no way for the user to access the internet -- including remote support.
My solution has been to name our VPN connection the same on every computer I set it up on, and then set a command to run on startup via group policy (make sure to change <YOURTUNNELNAME>:
sc.exe sdset WireGuardTunnel$<YOURTUNNELNAME> "D:AR(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWRPWPDTLOCRRC;;;WD)(A;;CCLCSWLOCRRC;;;IU)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)"
This gives the builtin "everyone" group access to read, stop, and start the wireguard service. At that stage, you can create a couple batch files on the users desktop to sc stop and sc start the service, and voila! User can control the VPN as needed.
2
u/gobtron Mar 30 '20
Interesting. Though I don't have "WireGuardTunnel" service on the computer. But I do have "WireGuardManager".
1
u/nihkee Apr 10 '20
Thank you. I was looking to do this with some old hp t620's to enable people work from home and you saved my day.
1
u/knaackville May 06 '20 edited May 09 '20
Awesome! Been looking for something like this. Paired with ServiceTray (https://www.coretechnologies.com/products/ServiceTray/), you can activate and deactivate on your status bar with an indicator for current status as well. Almost the same as the native app.
If you don't want it to start automatically, open up services.msc as an admin and turn to manual start.
1
u/ermax18 May 14 '20
Man great idea! Works perfect for me.
1
u/sheggy012 Aug 25 '20
Works perfectly, thank you.