For about a year now I’ve been using a Mac mini at home as a consumer-level entertainment server. It’s a baseline model that I added a 320GB internal hard drive and an external 2TB RAID to. It’s a very basic setup, the Mac mini is connected to my television for video output, a receiver that goes to surround sound speakers for audio output, and it’s on my wireless network at home. Generally this little machine houses all of my music, videos and pictures, and I also use the storage space as a backup playground for the other machines I have at home.
When I’m in my home I use “Back to My Mac” (a feature of Apple’s MobileMe service) to control the Mac mini from any room in my apartment. This is a great way to quickly turn on tunes and have them play over the Klipsch speakers in my living room, or to tell my Mac mini to download a new movie or TV show that I’d like to watch later that evening. It’s also a great way for me to transfer files between my mini and my other computers. The one thing that’s been lacking is remote access. While “Back to my Mac” boasts the ability to connect to one’s home computer from afar, this isn’t always the case due to different router configurations. Not wanting to spend the money for a static IP address from my internet provider to properly set up a server at home, I had let the idea rest for a little bit. Luckily, while doing research for a remote consult recently, I was turned on to DynDNS.
DynDNS is a free service that will keep track of the dynamic IP address provided by your internet provider and map it to one of its free domain names. I’m going to preface this by saying that the initial setup can be complex and it differs depending on your individual network configuration. So, if you’re not comfortable with reading user manuals and playing around with port configurations on your router, this might not be the best solution for you.
Setting up the account with DynDNS was simple, all I had to do was submit my current IP address and choose my domain name. I then installed a free application on my Mac, DynDNS Updater, that constantly checks for my current IP address and submits it to DynDNS so they can link it with my domain name. That means I can always use the same domain name to connect to my server despite the fact that my IP address is dynamic.
That’s the easy part. In fact, if you only have one computer at home and it connects directly to your DSL or Cable modem this might be all the configuration you need. Since I have several machines at home that all connect via an AirPort Express, I had to do a little more work. In my setup, my AirPort Express receives a public IP address and then distributes a range of private IP addresses to my computers at home. Think of it this way, let’s say we’re having a field day and every team is getting a number so they can be identified. I’m in team #1, naturally. Now my team might have ten members, so while our whole team is #1 all of my teammates need individual names; that’s what an internal IP address is, an individual name for each computer in my home. The problem with having all of these internal names is that when I want to connect to my server from afar only the public IP address is visible so there’s no way to call on an individual teammate, or internal IP. This means that I have to set up my router to forward all requests for specific services to one internal IP address; think of it as a way to set a team captain.
The first step is to set up the networking settings on my Mac Mini to connect via “DHCP with manual address”. This is done by going to System Preferences->Network Preferences->Airport. Click “Advanced” at the bottom right, select “TCP/IP” and select “DHCP with manual address”. The IP address that I tend to use is whatever address auto-populated initially. I do that because I know no other device on my network is currently using that address; some IT folks are more finicky about coming up with an order of what machine gets what address, that’s up to you.
Next, I need to set up my router to save that IP address for my Mac mini. I do that by opening the AirPort Utility (Applications/Utilities). Select the main base station and click “Manual Setup”. Select the “Internet” tab and then the “DHCP” tab. Press the “+” button underneath “DHCP Reservations” I entered in the MAC address for my Mac mini and the internal IP address that I would like it to have.
The last step is setting up the AirPort Express to correctly route all requests for the services I want to use on my Mac mini. To go back to the field day analogy, this is so that any requests that come from the public world end up going to my Mac mini, who has now become my team captain. To do this, while in the “Manual Setup” in AirPort Utility, click on the “Internet” tab and then the “NAT” tab. Enable NAT, then click on “Port Mappings”. Press the “+” button to add a new mapping. As a helpful leg-up, Apple adds in some default ports that one might want to enable. My main two are “Remote Desktop” and “Personal File Sharing”. The field that then populates allows you to add the internal IP address of the machine that the request should be forwarded to, in this case the Mac mini. Those two ports allow me to use Apple’s Remote Desktop software to remotely control my Mac mini, and AFP for file sharing between Macs. There are several other port options that might be valuable to you but it will depend on your setup.
Now if it does turn out that your internal IP addresses are being populated by another router, or, in the case of my client, multiple routers, the setup could be less straightforward. Anecdotally, in my client’s case, it was better for her to leave her Time Capsule in bridge mode and configure her CradlePoint router to do all of the above (though AFP wasn’t supported on that router). It’s a lot of trial and error, but I’ve been incredibly pleased with the results so far. For someone who’s constantly on the road, I love having ultimate access to my computer at home!