Hack 68 Sharing an Internet Connection


Turn your Mac into an Internet lifeline for those unwired systems around you.

I recently found myself at a meeting utterly surrounded by iBooks and PowerBooks, all connected by an invisible thread of 802.11b WiFi access. No Ethernet cables to trip over, no hubs taped to the tables, and no Internet access for the couple of poor souls running older Macs and Thinkpads without wireless access. In a valiant run at fairness, people started pitching in for a couple of WiFi PCMCIA cards and the group leader put on his heavy coat for the dash down the road to the local computer store.

Unfortunately, as such stories always go, one of the two disabled laptops didn't even have a PCMCIA card slot. There were mumblings about USB WiFi dongles and even one vote for buying an Ethernet hub; we had the cables.

Thank goodness all this scurrying was for nought. There were already at least 10 Ethernet hubs cum wireless bridges right beneath our very noses. Everyone had plumb forgotten about the Jaguar's ability to share Internet access.

Dongles and cables produced from various backpacks were used to plug each of the unfortunate laptops into a nearby iBook, and a few moments later everyone was wired ? and happy.

68.1 Internet Sharing

As with all the coolest of features in Mac OS X, Internet Sharing is just a matter of clicking a Start button. Open the System Preferences Sharing pane and click the Internet tab (see Figure 6-2). If it's not already on, click the Start button to start sharing Internet access with those in the vicinity less fortunate than you. This assumes, of course, that you're connected to the Internet in some manner; otherwise, all this is not particularly useful.

Figure 6-2. Internet Sharing over Ethernet

You'll notice that OS X is smart enough to figure out that since you're connected to the Internet over AirPort, it'll share Internet access over the only other available network port, Ethernet (see Figure 6-3). Conversely, if I were tethered to the Net by an Ethernet cable, OS X would notice that AirPort's free and turn my iBook into an AirPort base station.

Figure 6-3. Internet Sharing as a software base station

Just like its hardware counterpart, your software base station has its own identity and can be configured to stick to a particular channel, remain open for neighborhood use, or be locked down using WEP encryption and password. The one thing you can't do is restrict by MAC, the hardware address burned into your wireless card.

Now take a look at the screenshot in Figure 6-4 and see if you notice anything out of the ordinary.

Figure 6-4. Internet Sharing with a second Ethernet adapter

Where the heck did that second Ethernet adaptor come from? Remember, I have an iBook with only one Ethernet card and no room for expansion. OK, so there are USB solutions, but I have no need of them.

Give up?

I just turned on my FireWire network port, of course! Apple's recently announced IP over FireWire means that cable you usually plug into an external hard drive can also be used for network access. Simply install the preview release software (http://developer.apple.com/firewire/IP_over_FireWire.html) on both machines, plug them in to one another with a FireWire cable, and fire(wire) away! Figure 6-5 shows the FireWire Network port.

Figure 6-5. The FireWire Network port

68.2 See Also

  • [Hack #69]