Link to home
Start Free TrialLog in
Avatar of ishtari
ishtari

asked on

Make mac VPN connections easier

I have an SBS 2003server (it will be replaced with a non-SBS flavor of windows server 2008 soon) at the HQ that users connect too via PPTP VPN. Our branches will also soon be connected through site-to-site VPN through the new firewalls that are ordered. However we have a few mobile mac users that needs to connect to the office while they are on the move, with a variety of connections like3G modems, WIFI and private ADSL.

I have setup for them so that they use the built in VPN connection in OSX which works great. Then they connect to the server shares through the saved smb://serverip shortcut in the finder menu "connect to server".

So all they have to do is, in the menu bar at the top click on the VPN symbol, click on the company name and then go to the finder menu and click "connect to server" and then the saved server and they have access to the files. I have also made a few manuals with pictures and a low-tech language.

The problem is, however, that they want something even simpler when they are on the move. 4 or 5 mouse clicks seems to be too much for them. I am work mostly with windows computers and servers so I am not an expert on mac. Is there a way to script the VPN connection and connect shares in some way on the mac? Or is there perhaps an other way to make things simpler for the users?

Also: When the macs are physically in the same network as the server they see the server share directly under "Macintosh HD" however when they connect through VPN the shares doesn't show until they do the "connect to server" procedure above. Is there a way to fix that as well?
SOLUTION
Avatar of jhyiesla
jhyiesla
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ishtari
ishtari

ASKER

Hehe, I wish they would! If you could show me a script that could accomplish that I would be in your debt! :)

is there perhaps a way to automatically run a script when they connect to the VPN? Or perhaps have the script start a preconfigured VPN connection?
That I don't know. I'm not a script Guru. I just wrote the one above to help me easily mount shares that I use every day.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ishtari

ASKER

Thanks guys!

I got the script to work and it mounted the folders but I can't seem them. They show up when I type mount in the terminal as

//username@192.168.0.5/Gemensam on /Volumes/Gemensam (smbfs, nodev, nosuid, mounted by tore)

But when I click on Macintosh HD they are neither under Volumes or Shares in the right hand pane. Where are they and is it possible to get them right on the desktop so that the users doesn't have to search around for them? Sorry for being a McNoob guys!
I can't speak for anything outside of the script I wrote, but once it's "compiled" it should mount them so that they show in Finder.
Ahh,
Just tested the 'mount volume' here, and it's not a Finder command.

So you can strip the 'tell application "Finder"' part, here is the working connectShares() method:
on connectShares()
		--delay 0.3
		try
			--mount volume "smb://Servername1/applications"
			--mount volume "smb://servername2/lis"
			--mount volume "smb://servername3/public"
			
		end try
end connectShares

Open in new window

Actually the script I wrote does work exactly as I have it written and my shares do show in finder. Not sure if adding the connectshares to the mix changed that or not.  I use this script everyday.  Wrote in under 10.5 and it works under 10.6.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Appreciate the info.  I've not redone the script in the editor since I wrote it.  All I know is that the compiled code works for me everyday and I do see the mounted shares in Finder.  I'll play with it in the editor when I get a chance.
Avatar of ishtari

ASKER

My bad! I found the mounted shares under "computer", I am still a bit stuck in my windows thinking and mistakenly thought of "Macintosh HD" as "My Computer" in windows. Sorry for that. (Aa a side note I got the same result with or without the "tell finder" part in the script running 10.5)

However, is there a way for the shares to show up on the desktop in the script?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ishtari

ASKER

That did the trick, thanks a lot to all that contributed. I hope I can find a fair way to distribute the points between all of you! :)