Set Default Network Route

Most servers sit behind your company firewall, reachable only through NAT and port forwarding or protected from the outside world entirely. If you've got a machine that needs full access to both the internet and your local network, however, getting both interfaces up and running can seem like a crapshoot. New servers will usually work fine, while those configured on a second network later on will often fail. XServes and Mac Pros come with two ethernet ports, so you'd figure setting them up on two separate networks wouldn't be much of a challenge. And it isn't, if you know the trick.

Unix operating systems (including Mac OS X) can only have one "default route" at a time, the path of last resort for data headed outside your local network. Mac OS X uses whatever you've configured on "Ethernet 1" in the "Network" pane of System Preferences as the default route. That's usually the internal IP on your firewall, proxy server, or router. If you later configure an external IP as "Ethernet 2", your data won't be routed properly and the machine won't respond on the outside interface.

System Preferences: Network Router - Ethernet 1

The trick to getting your Mac routing both networks is to set up "Ethernet 1" as your external (or WAN) interface, using the information provided to you by your internet service provider. Mac OS X will then set the router setting from this connection as the default route for the machine. If, for some reason, you have to use your internal interface as "Ethernet 1", remove the IP from the "Router" field. This will force the machine to use the router information from "Ethernet 2" as the default.

Special Thanks: This tip came in a crunch from our colleague Jared Reimer, founder of Cascadeo Corporation, an excellent Seattle-based network consultancy.

Share Group Folders

Aside from the files an OS X Server shares across your entire enterprise, there's often the desire within individual workgroups to have private storage areas for their own projects. These group folders are essential for departments like HR and Accounting, but they can also be helpful for less security-conscious groups as a staging area before sharing their final work company-wide. Fortunately, while the process of creating these file shares isn't obvious, it also isn't complicated.

First, select a group from your Open Directory domain in the "Accounts" pane of Workgroup Manager. Then click the "Group Folders" button, and select a share point under which you'd like the group folders to appear. By default, Mac OS X uses /Groups, which comes pre-configured as a share on a new installation. Next, you'll need to choose an owner for your new folder. Your directory administrator account makes the most sense here, as you'll be using the group (not owner) attribute to determine access permissions. With these options configured, hit "Save".

Workgroup Manager: Assign Group Folders

For whatever reason, you can't actually use Workgroup Manager to create the folder you've just configured (as you can with user's home directories). Instead, you'll need to open the Terminal and type:

sudo CreateGroupFolder

This will build a folder for every group assigned a share point, not just the most recent, so if you're deploying multiple group folders it makes sense to run this command after they've all been set up in Workgroup Manager. This also sets the permissions for each group folder as read-only to the group itself, and only read-write to the individual user defined as it's owner. To remedy this in the Terminal, type the following, replacing PATH-TO-FOLDER with the full Unix path to each group folder:

cd PATH-TO-FOLDER
sudo chmod 770 Documents/ Library/

This will allow access by workgroups to their own group folders with a simple permissions scheme. For more complex sharing setups, you may wish to add an access control list as well, in the sharing pane of Server Admin.

Workgroup Manager: Automatically Mount Group Folders

Finally, if you're utilizing managed preferences in an Open Directory environment, you can set group folders to automatically mount when a member of that group logs in to their workstation. Moving to the "Preferences" pane of Workgroup Manager, click the "Login" icon, then the Items button on the far right. Check "Mount share point with user's name and password" and "Add group share point", then click "Apply Now".

Not only can each workgroup have their own private file share, but users will connect to those shares automatically when logging in to their Open Directory account.

Deploy Corporate iPhone Settings

The first time a VP brought you their iPhone to configure, it was a new toy. It was fun, even if it took twenty minutes of typing on that tiny onscreen keyboard. Now with version 2.0 and Exchange support, the iPhone it isn't new or a toy anymore, but it would still take you weeks to individually configure all the iPhones your company needs.

It's for these enterprise-wide deployments that Apple provided the iPhone Configuration Utility, an OS X native application to create and distribute settings for corporate iPhones. Install the program on any Macintosh (or use the web-based version for Windows) and you can create .mobileconfig files that set passcode policy, wireless networks, VPN, POP/IMAP or Exchange email, and more.

First, open the iPhone Configuration Utility, select "Configuration Profiles" and click "New" in the toolbar above. Moving through each of the application's tabs, fill in the appropriate access and account information for your network. Individual account names and passwords need to be input on each device by the user, but security certificates can be pre-loaded by your administration team. You can create as many configurations as are reasonable for your environment, offering different setups for different classes (or departments) of employee.

iPhone Configuration Utility: Exchange Settings

Once your policy and access information is in place, you can distribute each configuration by clicking "Export" to save the file to disk then upload it to any web server. This method (preferred over email distribution for large deployments and new devices) requires that your web server transmit .mobileconfig files uncompressed and with a MIME type of application/x-apple-aspen-config. Mac OS X Server 10.5.3 and above are pre-configured this way, while Windows users can set this in the server Properties page of IIS Manager. Those running earlier versions of OS X can add this information using the MIME Types pane of the Web settings in Server Admin.

By simply browsing to the appropriate URL, each iPhone will automatically begin the installation. While this process will prompt the user for their domain authentication criteria before configuring the device, it's still advisable to limit access to the URL by only serving the .mobileconfig file to your intranet. Also, while adding a signed profile in the "General" pane (using a certificate issued by one of Apple's pre-installed trusted root authorities) isn't required, it's simpler to get a new security certificate issued for this purpose than try explaining to users why it's OK to install an unverified profile that lacks the attractive green "Trusted" icon.

With very little work up-front, this process offers not just a way to minimize initial deployment times company-wide, but also allows a method to distribute network access changes across your entire enterprise down the line.

Recommended Reading: For further information on customizing iPhone configuration, download Apple's iPhone Enterprise Deployment Guide [PDF - 728KB].

View Installer Package Contents

Since Mac OS X premiered in 2001, a wide range of applications have shipped with installers in Apple's .pkg format. While the contents of these installers were originally browsable in the Finder or from the command line, determining exactly what will be installed (and where) can still be a difficult and time-consuming process. It's made all the more frustrating by the fact that .pkginstallers lack an uninstall option, making such detective work a requirement to completely uninstall some third-party software. And in Leopard, there's a new "flat package" format, which can't even be read without Apple's Developer Tools.

That's where Suspicious Package comes in, a Quick Look plugin that lets you view exactly what and how will get installed by any package-format installer.

Suspicious Package Quick Look Plugin

Just select a .pkg file in the Finder, hit the space key, and you're greeted with an interactive Quick Look window. The folder structure of the installer can be browsed using the unfolding arrows to the left of the file names, and the installation scripts can be read with the expansion button to the left of the script icon. Suspicious Package even lets you know if an installer requires an administrative password to run, or that your machine be restarted after installation.

Designed to do just one thing, and do it very well, Suspicious Package is an incredibly clever (and incredibly useful) little utility. It's also an enormous time saver, and a fantastic extension of Apple's Quick Look framework.

Suspicious Package is available for free from Mothers Ruin Software.

Flush Network Caches

You've just installed a new hardware firewall with the same IP as one that's being replaced. Your routers can all see it, but traffic from your Macs seems to just disappear. Or you've renamed a series of servers the whole company uses, and the Macs can only find them by IP now. You know you can just reboot the problem machines, like you'd power-cycle an unmanaged switch, but that solution is impractical during business hours (and time-consuming on nights or weekends). How can you force a couple hundred Macintosh computers to update their network caches?

The ARP (Address Resolution Protocol) DNS (Domain Name System) caches are very different, but they server very similar purposes. ARP tables hold the information mapping ethernet MAC addresses (0a:1f:b5:c0:8e:4a) to network IPs (192.168.0.75), while DNS servers translate fully qualified domain names (like router.makemacwork.com) into IP addresses. Both types of information are cached to make subsequent lookups faster, but when changes take place on your network it's hard to predict when that information will get updated.

Fortunately, it's trivial to flush these caches on the Macintosh command line, and those commands can be sent to hundreds or even thousands of machines at once using Apple Remote Desktop's "Send Unix Command..." function.

On individual machines, you can clear the ARP cache in the Terminal and typing:

sudo arp -d -a

The DNS cache (along with all Directory Services caches) can be reset by typing:

sudo dscacheutil -flushcache

If you're sending the commands out with Apple Remote Desktop, leave out sudo and instead be sure to set the "Run command as" user to "root".

That's all it takes to force your Macs to fetch new routing and domain information, without ever having to interrupt the people working on them.

« Later PostsEarlier Posts »