This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SSL-VPN non admin VISTA/WIN7

Hi people,
Today i found i way to run the SSL-VPN client as non admin on Vista/win7 using the builtin NetworkConfigurationOperators Group.
The only drawback is that the user has to enter its own password once in a UAC Popup when starting the VPN-GUI but thats still much better than giving them full admin access.
After some searching i turned up this news-list post : Gmane -- Mail To News And Back Again which describes how one can use the networkconfigurationsoperators group with vista and openvpn.exe.
This worked quite well but the modified executable no longer works with the vpn gui and all my users are used to it allready.
So i took it one step further and applied the relevant changes to the openvpn-gui.exe.manifest that is installed with the ssl vpn installation package.
Then i used mt.exe to embed this new modified manifest into the openvpn-gui.exe file.
Now a user of the Networkconfigurationoperators Group can use the openvpn-gui.exe to successfully initiate and stop vpn sessions with a astaro appliance or other openvpnserver.
It will display a UAC popup on start in which the user can authenticate using its own password and username, the openvpngui starts afterwards and is fully functional as non admin user.
I tested this procedure on Vista and Windows 7.
Feel free to contact me if you need more details on howto do that.

Hope this i usefull to someone.

kind regards 

Michael Golisch


This thread was automatically locked due to age.
  • Hi Michael,

    That's very interesting. Have to try that out too.

    Can you may post the manifest file you have used? (Or is it the same as in the mailing list you wrote?)

    And maybe the command you used for mt.exe (Has a lot of options as i see).

    With this configuration, is it possible to lunch it at startup again or not?

    Thank you for sharing it with us.

    Urs
  • Hi,

    this sounds really interesting! Could you post/send more informations?


    regards

    daniel
  • Cool. I see what's happening here. 
     
    I'm assuming that only the portion
     






     
    needs to be added. Could you possibly post the contents of your modified openvpn-gui.exe.manifest, since it has a dependency section that doesn't exist in the article linked above and I want to get the placement right.
     
    Also, did you use the version of mt.exe from the Vista SDK or a different one?
  • Yeah only that Trustinfo part needs to be added.
    My modified openvpn-gui.exe.manifest looks like this: 




    Astaro SSL VPN Client

         
             
         


         
           
             
           
         
       



    I used the mt.exe that came with Visualstudio 2008, but i guess other versions work too.
  • Thanks for the update.
     
    Update: OK, I finally got around to testing this out myself. This was with the Astaro VPN from V8 (1.7) on a Win7 x86 machine. I only added a manifest to openvpn-gui.exe. User added to Network Config Operators group.
     
    The first thing that I noticed is that the VPN client log directory permissions need to be modified to allow a log file to be written and to avoid a notification message about not being able to access the log file.
     
    The user can start the application fine just by clicking on it. For me, no automatic elevation prompt was given. A connection can be made like this, but no route is written, so it's fairly useless in this state.
     
    To run properly, the user must right click and choose Run As Administrator, which will trigger the UAC elevation prompt and allows the user to enter his/her own credentials to set the correct rights.
     
    Going into the properties of the program (or shortcut), Compatibility Tab, and checking Run this program as an administrator to force automatic UAC prompt should not be done. Doing so will only allow full administrator credentials to be entered and not the users.
     
    I'd be interested in finding out why your getting the elevation prompt when a user starts the program and in my test, this didn't happen, requiring right-clicking and choosing Run As Administrator. It may be that your using a different version of the VPN client (I think Astaro 7.5x comes with v1.5 of the client). From your first post, depending on how it's read, it almost sounds like you applied a manifest to both openvpn.exe and openvpn-gui.exe which could be another differentiator.
     
    Further edit:  It's differences in the client versions.  V1.5 will automatically prompt when run, while v1.7 will not, so requires using run as admin.
  • Here's the explanation from Microsoft why this is happening:


    The CreateIpForwardEntry function can also fail because of user account control (UAC) on Windows Vista and later. If an application that contains this function is executed by a user logged on as a member of the Administrators group other than the built-in Administrator, this call will fail unless the application has been marked in the manifest file with a requestedExecutionLevel  set to requireAdministrator. If the application lacks this manifest file, a user logged on as a member of the Administrators group other than the built-in Administrator must then be executing the application in an enhanced shell as the built-in Administrator (RunAs administrator) for this function to succeed. 

    Source: MSDN CreateIpForwardEntry Function (Windows)


    I'll check if adding the "requestedExecutionLevel" to the GUIs manifest is an option up until the full blown fix to the general issue of regular users no being able to run openvpn. Any experience you made so far is very welcome.
  • I believe the OpenVPN folks are working on a fully compatible Vista / Win7 client (one that uses a service to get around all the UAC nonsense) ... has anyone had a look at that yet?
  • Yes, it's me driving this initiative, but it will be some time until something in releasable state will be available. I aim to fill the gap with this "fix" to at least have something that comes close to the situation with XP.
  • Hi, 
    I don't know if my issue is related to the described one. I have laptop with Windows 7 PRO and I installed SSL VPN Client 1.7. When I run the opengui, a popup appears with an error message that says (translating from italian): 

    "Error while opening log file in write mode: C:\program file\astaro\astaro ssl vpn client\log\username@firewall.log. Perhaps you don't have admin rights required by OpenVPN."

    The stangeness is that the tunnel seems to be built successfully (green led icon), but I cannot ping internal addresses nor surf in shared folders. If I "Run as administrator", I don't see the error message and I can ping everything and surf in shared folders. I tried a lot of times and the behavior is alwasy the same: if I don't run as administrator the tunnel seems to be built successfully but... you cannot use it.

    Reading your posts I noticed also that .manifest file is absent in bin directory (wihle in all other XP installation I see it). 

    Any idea?

    PS: I tried also to assign full control to the user in Astaro directory, the error does not appears but the VPN does not work

  • The stangeness is that the tunnel seems to be built successfully (green led icon), but I cannot ping internal addresses nor surf in shared folders. If I "Run as administrator", I don't see the error message and I can ping everything and surf in shared folders. I tried a lot of times and the behavior is alwasy the same: if I don't run as administrator the tunnel seems to be built successfully but... you cannot use it.


    Yes, that's it. The routes can not be set when you are not the Administrator himself. Sadly OpenVPN does not report the failure of setting the routes as failure, but reports success. That's why the light is green.


    Reading your posts I noticed also that .manifest file is absent in bin directory (wihle in all other XP installation I see it). 


    The manifest is compiled into the openvpn-gui.exe binary in newer versions.