Sunday, May 17, 2009

How to set up port mapping for iChat video chatting

Here's how I set up to be able to receive incoming connections for iChat for video chatting (or audio chatting or screen sharing). These instructions should work for a Time Capsule, AirPort Extreme, or AirPort Express.

Step 1 - Set up static IP addresses

The first step is to make sure that all computers on your home network have static IP addresses. The easiest way to do this is to simply have the AirPort Base Station/Time Capsule hand out the same IP address via DHCP each time. You can do this using AirPort Utility. Select your base station and go to Manual Setup. Under Internet -> DHCP -> DHCP Reservations you should add an entry for each computer.

You will need the Ethernet MAC address for each computer, which you can get in System Preferences -> Network. Go to the interface you use to connect (AirPort or Ethernet) and click Advanced... and go to the Ethernet tab. There will be an Ethernet ID listed which is a sequence of numbers and letters A-F with colons. This is what you want.

Copy and paste this into AirPort Utility, or retype it as appropriate. Then assign an IP address which is below your starting DHCP range. In my example, the dynamic range starts at 200, so anything under 200 would be fine. I use 100, 101, etc. for the statically assigned addresses.


Repeat this process for each computer on your home network that you want to use iChat video chatting/audio chatting/screen sharing with.

An alternative to this would be to use the use DHCP with manual IP address option in System Preferences -> Network. This option works best with desktop machines, since laptops may move to different networks and the static IPs you assign will likely not be valid on other AirPort networks.

Step 2 - Set up port forwarding

Now that you have the IP addresses assigned, you can redirect incoming connections to these static IP addresses as appropriate. This is done in AirPort Utility as well, under Advanced -> Port Mapping.

The port range for iChat is UDP ports 16384-16402. Starting with Mac OS X 10.5 Leopard, iChat will first try 16402, and then continue with the lower numbered ports down to 16393. Earlier versions of Mac OS X use 16384-16392 as well. If you just have one machine you can map the entire range, but if you have more than one, just assign one port to each and then the remaining ports to the computer that is most likely to be used for chatting. Here are some examples:





As you can see, you can enter both ranges of ports with a dash, or a list of ports with commas, or a combination.

Other routers

For other routers, such as LinkSys, you have to use the web configuration interface (which is usually just the router's IP address). As far as I can tell the standard LinkSys firmware does not support static DHCP reservations, but custom firmwares like HyperThibor do.

Port mapping on the LinkSys is done under Applications & Gaming -> Port Range Forward. It is not as flexible as the AirPort, so you will need one line for each continuous range of ports.