Activity › Forums › Storage & Archiving › VPN and OS-X 10.x
-
Dave Klee
October 19, 2009 at 11:30 pmHey Matt, this is a great summary of the whole VPN / VNC issue. Nice work!
There is one free, fairly easy to use and low-configuration VPN application for OS X that I’ve played with called HamachiX. Some decent tutorials about it can be found here:
https://www.freemacblog.com/mac-server-series-setting-up-a-vpn-on-a-mac-with-hamachix/
Unfortunately, this easy to use OS X software package is not being updated anymore — either it works or it doesn’t and there’s no support. But, when it works, it’s very easy. And, it’s based on the Hamachi command-line utility that is pretty solid and effective cross-platform. https://en.wikipedia.org/wiki/Hamachi
Here’s an outline of how it can be used from a Mac to connect to and control remote Macs (sorry if this is rudimentary for most):
1. Download HamachiX for Mac to your computer: https://www.freemacware.com/freemacware-downloads/877
2. Drag the application to your computer once it downloads. Open it up. Accept the user agreement and install the underlying software.
3. Once it’s running, click the “Add” button at the top of the main HamachiX window. This will allow you to create a new Virtual Private Network of your very own.
4. In the “Assistant” window that comes up, give your new network a cryptic name that nobody will guess. Also a strong password that nobody would guess. These two things separate your computers from the world. Make them good.
5. Still in this “Assistant” window, generally you want “Create Network on Demand” checked. This allows your Virtual Private Network to be created whenever a computer using this software (and having your name and password) starts up.
6. Click “Add” to create the network.
7. Close the “Assistant” window after you click Add (if it doesn’t close automatically).
8. Go to the “HamachiX” pull-down menu at the top of the screen, select preferences, and give this computer a nickname if you want. Makes it easier to figure out which computer is which later on.
9. Leave HamachiX running on your computer for a while, and continue on. This ensures your VPN stays active so you can test it soon.
10. Install HamachiX on another computer (like a computer in your client’s office) by downloading it, dragging it to the computer, launching it, and accepting agreements and installing the background stuff when asked.
11. Once HamachiX is running on this second computer, click the “Add” button like above from the main window, and enter the same network name and password and make sure the “Create Network on Demand” radio button is selected in the “Assistant” window that pops up. Click “Add,” then close the “Assistant” window if it doesn’t automatically.
12. Go set a nickname (like step 8 above) for this new computer.
13. In theory, in the main HamachiX window, if you click the name of the network you created on the left, you should see a list of all computers on your network along with the “fake” network address that each computer has assigned (probably starts with 5.something). Hopefully all computers show green lights next to them. The “fake” network address of the computer you’re sitting at is listed after “Hamachi ID” in the top bar of the main window.
14. Assuming the light is green next to a computer in the list, you can connect to it through a variety of methods including VNC, screen sharing and Apple Remote Desktop. I’ve had the most luck with Screen Sharing, so the rest of the instructions here assume you want to connect to the second computer using screen sharing (with all running OS X Leopard).15. Make sure screen sharing is enabled on the computer you want to connect to — probably the second computer at the client’s location. (Apple System Preferences, Sharing) Make sure you’re happy with the security settings on which user accounts are able to connect using screen sharing, and if you allow things like VNC connections. (You don’t have to enable VNC for this to work from a Leopard machine, but would if you wanted to be able to connect from an older Mac using VNC client software like Chicken of the VNC.)
16. From another computer using HamachiX and connected to your Virtual Private Network (probably the first computer you set up), launch the screen sharing application that’s kinda hidden (like Simon said) in the System -> Library -> Core Services folder.
17. When prompted for a “Host,” type in the “fake” address for the computer you want to control (again, probably the second computer) from the HamachiX list (that probably starts with 5.something).
18. Hopefully you’re prompted for a username and password (this is for the computer you’re connecting to – probably the second computer you setup), and then you’re able to control the remote computer.You can also do some other things with the remote computer like share files. If file sharing is enabled on the remote computer, just “Go” and “Connect to Server” like normal on the computer you’re connecting from, but type in the fake Hamachi address for the computer you’re connecting to when prompted for the server address. Anything that the remote computer is configured to share should be accessible to you.
Now, HamachiX has some limitations. It doesn’t go through every firewall. It isn’t 100% stable (crashes occasionally). If you’re out at a hotel or somewhere that blocks VPN access ports, you won’t be able to connect. Some information about your network is stored on a remote server (called a mediation server, that takes care of making the connection). And, there’s nobody to call for help — except Mr. Google.
But, when it works, it’s great. It could be the kind of thing you could have a client click on to fire up when you need access, then quit when you’re done. I’m not sure how I’d feel about keeping it running all the time on a SAN controller (ethernet or fibre channel based). (That’s a lie. I know how I’d feel about it. Bad.)
If you want a VPN service that goes through more firewalls and is more stable, you’re going to need to pay. And, like Matt said, there’s no way around getting IT folks involved in certain situations where your client’s network and firewall are heavily managed. But, using the combo of HamachiX and Apple’s built-in Screen Sharing capabilities might do the trick for some situations — for free.
Let me know if you have questions, and good luck!
-
Dustin Lau
November 2, 2009 at 9:36 amJust to add on to the post about hamachi, which I love and adore, you can also setup a script that will autolaunch a hamachi daemon on start up. This way you can access the machines remotely without someone having to start hamachi for you manually.
This is a tutorial for the process of doing that.
Obviously, this set of scripts requires that you’ve already installed both Hamachi and the tun/tap drivers.
To install the hamachi boot scripts, download this file:
https://freeasinbeer.com/hamachi-boot-macosx.tar.gzAnd then enter these commands in Terminal in the directory where you downloaded the file:
sudo cp hamachi-boot-macosx.tar.gz /Library/StartupItems
cd /Library/StartupItems
sudo tar zxvf hamachi-boot-macosx.tar.gz
sudo chown -R root:wheel hamachiThis should result in a directory
/Library/StartupItems/hamachi/Containing the files
/Library/StartupItems/hamachi/hamachi
/Library/StartupItems/hamachi/hamachi_helper
/Library/StartupItems/hamachi/hamachi_networks.conf
/Library/StartupItems/hamachi/StartupParameters.plist
/Library/StartupItems/hamachi/READMENext edit the beginning of hamachi_helper to reflect which account you used to install Hamachi by replacing “hamachi_account” with the appropriate account name.
If you installed Hamachi as root, I believe the script will work if you set HAMACHI_OWNER=root and HAMACHI_DIR=/var/root/.hamachi. Thanks go to one of the users for providing the correct HAMACHI_DIR variable setting. I’d thank them directly but here at freeasinbeer.com we respect your right to enjoy software anonymously!
After hamachi_helper works, change hamachi_networks.conf to contain the names of the networks you would like to sign on to. One network name per line, as many lines as you want. As far as I know there is no hard limit.
This package is designed to be run by SystemStarter during the boot process. However, you can test it manually by entering commands of the form:
sudo SystemStarter start hamachi
sudo SystemStarter restart hamachi
sudo SystemStarter stop hamachi -
Dustin Lau
November 9, 2009 at 12:41 pmThis post got me thinking and I’ve written a short article on getting hamachi and VNC running on your edit machines.
Reply to this Discussion! Login or Sign Up