Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

After VPN connection, automatically run VNC

After VPN connection, automatically run VNC

After VPN connection, automatically run VNC

My boss connects to one of his offices using Windows VPN client - the whole set up is no frills - all very vanilla.  He then uses RealVNC 4.1.1 to take over his desktop.  I have been informed taht this is "too many steps".

Is it possible to have RealVNC automatically launch immediately after a successful VPN connection?  I thought there was a way to tweak a 'run' line within the VPN settings but I can't find it.

In case this isn't clear I'll rephrase:

-- He double clicks the VPN icon on his desktop
-- He clicks the Connect button
-- It connects
-- He double clicks the VNC icon on his desktop
-- His screen appears

I would like to make VNC automatically launch after a VPN connection is established since this process is too cumbersome for him.

Your help is greatly appreciated and note that this is NOT a cross-post.  This is the one-and-only place I'm posting this question.

RE: After VPN connection, automatically run VNC

This is fairly simple with the proper tools, impossible without.  You need to use the Connection Manager Administration Kit (CMAK).

The CMAK is included with the Administration Tools for each of the recent server versions of Windows.  You do not need the server version to run the CMAK as it can be installed on non-server versions.  If you need help with this, reply with the version of Windows you would like to use to configure the connection (the version your boss is using doesn't matter).

You will use the CMAK to configure the client side VPN connection.  When you are finished, you will have an executable file that you can provide to your user (the boss).  When the file is executed on any remote computer, it will install a new connection profile.  The user will use this new connection to connect to the VPN.

The nice thing about the CMAK is that you configure most of the parameters and your user can't make changes, which tends to eliminate support issues.  There are also several parameters that you can configure with the CMAK that are not available through a regular connection created locally, including executing programs at different points in the connection process.

Running the CMAK is mostly a matter of filling in the blanks for the wizard.  Some things that are often confusing:

On the VPN support page, mark "Phone book from this profile" and "Always use the same VPN server", put the address of the server in the box.  If the server IP is dynamic, best to use a dynamic domain service and use that here.

Pay particular attention to the items on the "Virtual Private Networking Entry" dialog box.  You will need to click the edit button to check the settings, the wizard will go ahead with defaults if you do not.  Settings here should be similar to what you used to create the connection locally.  The "make this the default gateway" option is on the TCP/IP tab of this section.

On the Phone Book page, uncheck the box next to "Automatically download phone book updates".  Leave the other boxes on this page empty.

There is no need to do anything on the Routing Table Update page unless you want to do some advanced routing.  The standard route to the VPN server side network will be added automatically.

The Custom Actions page is where you want to add the command to start VNC.  Click "New" and fill in the description, command, and parameters.  Select "Monitored" for the action type and make sure the "Program interacts with user" box is checked.  

When the user starts the connection created in this way, it will begin very much like the current connection.  Once the connection is established, VNC will start and connect to the remote computer.  When VNC is closed, the user is notified that the VPN connection is no longer needed and will be closed in 30 seconds.  Selecting a "Monitored" action type creates this behavior.


RE: After VPN connection, automatically run VNC

This is fairly simple with the proper tools, impossible without.  
-- Oh good.  I was afraid it was one of those 'put a check mark here' type solutions where I was going to feel like a complete dope for not figuring out how to do it. ;)

You need to use the Connection Manager Administration Kit (CMAK).
-- Never heard of it but I'm on it now!  

Your instructions are beautifully written.  Give me a day or 2 & I'll let you know how I make out!!

Thank you SO much!!!!

RE: After VPN connection, automatically run VNC

mhkwood..... you are BRILLIANT!!

This is PERFECT... it works FLAWLESSLY... I'm thrilled!

I also found http://www.isaserver.org/img/upl/vpnkitbeta2/cmak.htm that provides step by step images too.

And the fact that it's called a 'connectoid'... that just amuses me. ;)


RE: After VPN connection, automatically run VNC

That is a very insecure setup, FYI...just a gre tunnel or l2tp w/o encryption, you're begging for trouble...

My 1.5 cents...


tim@tim-laptop ~ $ sudo apt-get install windows
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Couldn't find package windows...Thank Goodness!

RE: After VPN connection, automatically run VNC

If you want to look at a free application for handling this, you could check out GBridge - it creates the VPN for you, sets everything up secure, and allows for both VNC and Windows RDP connections.  In your boss' case, I'd say the RDP would be the best option, assuming no one needs to see what he's doing on his office PC when he's accessing it remotely.

Then there are also comercial solutions, such as LogMeIn and TeamViewer, but they aint cheap. wink

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close