MacDevCenter    
 Published on MacDevCenter (http://www.macdevcenter.com/)
 See this if you're having trouble printing code examples


Panther Internet Sharing

by Wei-Meng Lee, Author of Windows XP Unwired, Contributor to Mac OS X Unwired
11/11/2003

Editor's note: IP over FireWire is now integrated into Mac OS X 10.3. We're publishing this short article by Wei Meng Lee to serve as a reminder that this method for sharing an Internet connection at work is preferred over setting up an ad hoc AirPort base station that might compromise security. Since many of us readily have FireWire cables on hand (for our iPods, iSights, etc.), IP over FireWire seems like a reasonable and secure option for quick and dirty Internet sharing in the business world. Here's a quick look at using it and a refresher on AirPort sharing.

I'm sure you've encountered this many times; you're at a location with a single network connection, but you need to provide connectivity for one or more machines. Since you most likely don't have a hub handy in your back pocket, it's helpful to know the options provided by Mac OS X. In this article, I'm going to show you how to share an Internet connection using IP over FireWire (more secure) and AirPort Internet broadcasting (less secure).

Using IP over FireWire

With the release of Panther, you can use your FireWire port for Internet sharing using a technology known as IP over FireWire (previously available for download as preview release). IP over FireWire essentially allows IP protocols-based services (such as HTTP, FTP, SSH, etc.) to be used over the FireWire connection. This means that you can use your FireWire port much like your Ethernet port.

Mac OS X Unwired

Related Reading

Mac OS X Unwired
A Guide for Home, Office, and the Road
By Tom Negrino, Dori Smith

For example, you have one Mac connected to the Internet via AirPort, and you want to allow another Mac to connect to the Internet via your FireWire port.

On the Mac sharing the Internet connection, go to System Preferences and open the Network preference. In the Network window, select Network Port Configurations under the Show: drop-down list box (see Figure 1).


Figure 1. Viewing the available network ports

Click on New... to create a new port. Give a name to your port and select Built-in FireWire as the port (see Figure 2). Click OK. Click Apply Now.


Figure 2. Adding a new FireWire port

Go back to the System Preferences menu and select Sharing. Click on the Internet tab (see Figure 3). Choose the connection that you want to share from. Since you are connected to the Internet via AirPort, select AirPort; if you are connected through the Ethernet port, then select Built-in Ethernet.

Now you have to select how users share your Internet connection. In this case, we are sharing the connection through the FireWire port. So check the Built-in FireWire option in the "To Computers using:" selection. Finally, click the Start button to start sharing the Internet connection.


Figure 3. Sharing an AirPort connection through the FireWire port

On the Mac using the shared Internet connection, you need to also add in a new FireWire port if you have not already done so. Then connect the two Macs using a FireWire cable. That's it! You can now connect to the Internet. To verify the connection, use Safari and see if you can load a web page. You can also go to the Network item in System Preferences and show the status of the FireWire port (see Figure 4).


Figure 4. Showing the status of the FireWire port

Sharing over AirPort

While sharing an Internet connection using a FireWire cable is quick and easy, you do need to have a FireWire cable on hand. In this section I am going to show you how to share an Internet connection using AirPort.

Keep in mind that if you're in the workplace or somewhere else that already has a secure wireless network in place, you may compromise the integrity of that network by setting up an ad hoc AirPort base station. Always keep your system administrator informed about wireless networking outside the normal business configuration.

First, you must be connected to the Internet using some other means (such as the built-in Ethernet port) than AirPort. This is because you won't be able to use the AirPort to connect to the Internet and use it for sharing at the same time.

To share an Internet connection through the AirPort, go to System Preferences and click on the Sharing item. Click on the Internet tab (see Figure 5). Select your connection to share (such as the built-in Ethernet port) and check the AirPort checkbox.


Figure 5. Sharing an Ethernet connection through AirPort

You should also click on AirPort Options... to further customize the wireless connection. I strongly recommend that you do this, then enable password-protected encryption (WEP). When sharing through the AirPort connection, you're essentially creating an ad-hoc network (also known as a peer-to-peer network). WEP is not fail-safe security by any means, but it is a good first level of protection that should be used with all AirPort sharing on 802.11b networks (see figure 6). While in the options pane, you can also specify the wireless network name and the channel number to use.


Figure 6. Configuring the wireless network

On the other Mac, you should be able to see the network name (see Figure 7). Select it and you can now connect to the Internet through this shared connection.


Figure 7. Viewing the Ad-Hoc network

Final Thoughts

Mac OS X allows you to share your Internet connection through any of your network ports. For example, here are some possible combinations:

Of course, you cannot share an Internet connection using the same port you're accessing the Web on. For example, you cannot share through an AirPort if you connect to the Internet using AirPort.

When network security isn't an issue, such as outside the business environment, using AirPort to share a single hard wire connection with multiple users is probably the most convenient method. Remember to enable WEP. If you're in the workplace with your Mac connected via Ethernet, then IP over FireWire might be a better and more secure sharing method.

Wei-Meng Lee (Microsoft MVP) http://weimenglee.blogspot.com is a technologist and founder of Developer Learning Solutions http://www.developerlearningsolutions.com, a technology company specializing in hands-on training on the latest Microsoft technologies.


Return to Mac DevCenter

Copyright © 2009 O'Reilly Media, Inc.