Create VPN status icon

Discussion in 'Programming & Software Development' started by Gunna, Jun 3, 2020.

  1. Gunna

    Gunna Member

    Joined:
    Dec 25, 2001
    Messages:
    7,728
    Location:
    Brisbane
    We use Windows in built 'Always on VPN' - as soon as there is an internet connection the VPN is established, there is no easy way for a user to tell the VPN is established. I'd like a simple red or green circle to advise if the connection is up and it could be tested by pinging a server on our corporate network every 5 seconds.

    Programming or coding is not something i've jumped into, so thought this would be a good 1st avenue. Any suggestions on where to start with this one or language to use?
     
  2. Sphinx2000

    Sphinx2000 Member

    Joined:
    Sep 16, 2001
    Messages:
    9,500
    Location:
    Brisbane
    Last edited: Jun 3, 2020
  3. OP
    OP
    Gunna

    Gunna Member

    Joined:
    Dec 25, 2001
    Messages:
    7,728
    Location:
    Brisbane
    It isn't a 3rd party app, it's built into Windows 10 pro\enterprise.

    I looked at a few 3rd party tools but they usually run\install with default setting so a preconfigured scaled deployment isnt possible.
     
  4. Dilbery

    Dilbery Member

    Joined:
    Nov 19, 2005
    Messages:
    1,286
    Location:
    Sydney, NSW
    Script the install with powershell to update the .ini/.xml/registry keys post install and away you go.

    To make things even easier https://psappdeploytoolkit.com/
     
  5. ir0nhide

    ir0nhide Member

    Joined:
    Oct 24, 2003
    Messages:
    4,505
    Location:
    Adelaide
    I get the request, but is clicking on the network icon on the bottom right and reading "connected" really too hard?
     
  6. OP
    OP
    Gunna

    Gunna Member

    Joined:
    Dec 25, 2001
    Messages:
    7,728
    Location:
    Brisbane
    Device based VPN is not listed in the network list, user tunnels are but we use a device tunnel
     
  7. ir0nhide

    ir0nhide Member

    Joined:
    Oct 24, 2003
    Messages:
    4,505
    Location:
    Adelaide
    Oh it's a pre-logon deal, sorry :)
     
  8. elvis

    elvis Old school old fool

    Joined:
    Jun 27, 2001
    Messages:
    42,767
    Location:
    Brisbane
    General suggestion from me is "stay close to the mothership". What builds this with the least effort, fewest dependencies, and is the most compatible with your environment?

    I'd say C#/.NET, given the end goal.

    Like everyone else here, I thought "surely this is a thing that already exists?". Went looking, and nope, it's all rubbish, ancient, or both. I'm in the same boat as your userbase: using a laptop handed to me by a customer to connect to their site, always-on VPN, zero notification on the status bar as to whether or not its working. I can dig into the system settings and see the status there (sort of), but otherwise it's completely hidden from me.

    And there's a constant stream of people in video meetings saying "oh, I have to reboot, the VPN doesn't seem to be working", because they have no idea what's going on or how to fix it, other than rebooting which works 50% of the time. And that's a 5 minute round trip due to the stupid things are configured (despite having super fast NVMe powered laptops that should reboot in seconds, not minutes, but are held back by remote settings applications, AD weirdness, connection stalls, etc).

    So, long story short, I think you've got apt cause to write a tool here, because the current offerings are rubbish, and the default human-level notification methods are lacking.
     
    Last edited: Jun 4, 2020
  9. wullieb1

    wullieb1 Member

    Joined:
    Jul 9, 2013
    Messages:
    469
  10. waltermitty

    waltermitty Member

    Joined:
    Feb 19, 2016
    Messages:
    1,440
    Location:
    BRISBANE
    This is probably like a 15 minute job, do you have dotnet runtime in your SOE? you could do a statically linked dotnet app if not.
     
  11. Caffeine

    Caffeine Member

    Joined:
    Jul 1, 2003
    Messages:
    1,653
    Location:
    Sydney
  12. OP
    OP
    Gunna

    Gunna Member

    Joined:
    Dec 25, 2001
    Messages:
    7,728
    Location:
    Brisbane
    One of the guys int eh U.S found this solution instead:

    reg add HKLM\SOFTWARE\Microsoft\Flyout\VPN /f /v ShowDeviceTunnelInUI /t REG_DWORD /d "1"

    Adds the device tunnel status to the top of the available network connections, simple, easy to deploy via SCCM or GPO and best of all it works
     

Share This Page

Advertisement: