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.

Saturday, November 15, 2008

Time Capsule update

Last weekend I went ahead and completed the switchover from my old LinkSys WRT54G to the new 1GB TIme Capsule as the primary router for the home network.

On the Time Capsule, I had to set up port mapping to match the previous configuration of the LinkSys. I also set up static DHCP mappings to match what was already set up. Enabled PPPoE client and DHCP server.

LinkSys changes:
- reset to defaults
- disabled WiFi
- disabled internet/WAN connection
- disabled DHCP server

I also needed to connect one of the LAN ports of the LinkSys to one of the LAN ports of the Time Capsule.

After setting all this up, I noticed the AirPort menu extra started showing the connected time for the PPPoE connection, which is a bit annoying. Luckily I was able to figure out that you turn this off from a submenu that shows up from the network name in the AirPort menu.

Another discovery I made was that with Leopard it is now possible to have multiple computers on the home network set up to do video chats. The secret was to map different incoming ports to different computers. In Leopard, iChat will try port 16402 and then continue trying lower port numbers down to 16393. Given that the Time Capsule is more flexible with port mapping, it was easy to set aside 16401 and 16400 for the laptops, while leaving all the old iChat ports for the Mac mini.

Wednesday, October 15, 2008

Already Voted

I've been a permanent absentee voter in California since the switch to electronic voting machines... given a paper trail for accountability and recount purposes I'm no longer opposed to electronic voting, but I just preferred the level of privacy and ease of referring to my sample ballot that the old method allowed.

This election is the first time I am actually turning in my ballot before election day, however. Kathy and I went through the propositions today and made our decisions. It's tough when there are 12 statewide propositions and 4 local propositions. Seems like we are doing the legislature's job for them sometimes.

In the end, I voted no on most of the propositions, though I did vote for a few. I also found a cool new website called Ballotpedia with lots of information for anyone who hasn't voted yet.

http://ballotpedia.org/wiki/index.php/California_2008_ballot_measures

Sunday, August 10, 2008

How to transfer local Time Machine backups to Time Capsule

I was able to successfully transfer the backups from our 500GB external FireWire drive to our new 1TB Time Capsule. This was not easy, so I decided to document the process for anyone who is interested.

1) Connect the external hard disk and the Time Capsule (via gigabit Ethernet) to the same computer.

2) Complete a backup to the hard disk, then turn off Time Machine while doing the conversion.

2a) If you have other computers backing up to the same hard disk, make sure those have a current backup as well before continuing.

3) Unmount the external hard disk.

4) In Disk Utility, create a new disk image from device from the external hard disk. Select the partition rather than the whole disk. I saved the image directly to the Time Capsule. This will take a long time. In my case, it took over 12 hours.

5) Unplug the external hard disk.

6) At this point, you have a .dmg with the complete contents of the external hard disk. This needs to be converted to a .sparsebundle image. This can be done using "hdiutil convert -format UDSB harddisk.dmg" on the command line. The sparse bundle will be smaller than the .dmg since free space is not copied into the sparse bundle image. In my case, I had enough space on the Time Capsule to fit both images at the same time.

6a) After the conversion was completed, I removed the .dmg file, and made another copy of the .sparsebundle. This is because I was backing up both my MacBook and Kathy's MacBook to the same external drive. In a single computer case this is not needed.

6b) Next, the two images need to be fixed up to only contain the relevant files and free space on the Time Capsule. I mounted each image and deleted the inappropriate set of backup files. This seemed to work best dragging the top level folder under Backups.backupdb to the trash and then doing rm -rf in Terminal on the files. Emptying the trash might work as well but seems to be slower.

6c) After removing unneeded files, to free up space on the Time Capsule, unmount the disk image. Then run "hdiutil compact image.sparsebundle" in Terminal. This will remove unused band files from the sparse bundle.

7) Configure Time Machine to use the Time Capsule and start a backup. Once a disk image is created, stop the backup. The image should be named <computer>__<uuid>.sparsebundle. Remove this image and rename the sparsebundle you created to match the name. Then do a backup again. You should still be doing this over Ethernet.

8) After the first backup, wireless backups should be fine.

The only other consideration is that the image size may not be correct (500GB vs. 1TB), but I don't suspect to run into that limit any time soon, and it is easy enough to resize using hdiutil.

Wednesday, August 06, 2008

Time Capsule arrived

We finally took the plunge and got a 1TB Time Capsule to replace our current 500GB Maxtor hard disk which has been backing up Kathy's and my MacBook since we upgraded to Leopard (around the time of my last blog post actually - yes I am lame for not blogging for so long).

So far I am liking the Time Capsule. Right now I have it set up in bridge mode and am still using the LinkSys WRT54G as the main router. Here are some of the tradeoffs between the two routers:

* Time Capsule has a built in hard disk which can be used for wireless backup
* Time Capsule supports USB printer sharing (thinking of moving the inkjet printer to be shared this way - it's currently shared by the Mac mini)
* LinkSys supports dynamic DNS which I am currently using... Time Capsule supports Back to My Mac, but doesn't seem to support dynamic DNS
* LinkSys has 4 100Mbit ports plus 1 uplink port, Time Capsule has 3 Gigabit ports and 1 uplink port
* LinkSys is 802.11g, Time Capsule is 802.11n
* Time Capsule requires a reboot for any configuration change, which takes 30 seconds or something. Config changes on the LinkSys happen much faster.

Overall, I think I should be able to totally replace the LinkSys with the Time Capsule, but the first challenge is to transfer our last 9 months of backups over to the Time Capsule. This is not as simple as you might think because the Time Capsule needs backups in sparsebundle disk image format, and the backups we have are just stored as files on the hard disk directly. I have an idea for how to get this working which is taking a while. If my plan works I will post an update on how to do it for anyone who's interested.

Tuesday, November 20, 2007

Thanksgiving preparations

We're having Kathy's family over for Thanksgiving again this year so today was spent doing a lot of preparation work... we did the big Safeway trip (got there around 5 so the store was not crowded yet - yay), and last night I replaced the dimmer switch that burned out recently with a better one that has a separate slider and on/off switch, plus replaced the bulbs in the track lights. I wasn't able to find CFLs that would work so I just went with 60W halogens for now. Maybe later I will get some different fixtures for the track that can hold a dimmable CFL flood (which seem to only come in the long neck versions of the bulbs).

Also, is it just me or is it really, really annoying that everyone seems to have forgotten about waiting until the day after Thanksgiving to start the Christmas music and decorations? In some cases, Christmas stuff was out even before Halloween.

Saturday, November 10, 2007

Recent upgrades

Since my internal hard disk in the Mac mini indicated it was failing two months ago, I switched over to running it off an external hard disk. The internal drive wasn't giving me any problems, but I also wasn't using it. Recently I noticed some strange noises coming from the internal drive so I decided to go ahead and replace it. It seems the best option for the old ATA/100 2.5 inch drives is a 160GB Seagate, so that's what I got. I figured since I was going to have to open up the machine I might as well max it out by getting an 8x dual layer SuperDrive and 1GB of memory (good preparation for upgrading to Leopard as well). I also had to pick up a putty knife to pop the top off.

The upgrade turned out to be both easier and harder than I expected. Getting the top case off was fairly easy, but dealing with the bluetooth and AirPort antennas and the plastic cage that holds the optical drive and hard drive was harder than I expected. Still it didn't take too long and now the mini is running nicely from the internal hard disk.

The other upgrade I did recently was to switch over compact flourescent bulbs from incandescent for most of the lights at home. The 60W and 40W equivalent bulbs work pretty well now (come on instantly, no noise, soft white light). And, they aren't that expensive. A 4 pack was about $7 at Home Depot. This is still more than conventional incandescent bulbs, but the 75% savings on power consumption and longer life end up making them cheaper over the life of the bulb. And less power consumption is better for the environment given that a large percentage of our power is generated from coal power plants.

The only remaining lights that are still not CFL or regular flourescent are two 75W flood lamps on a dimmer switch and a 30/70/100W 3-way bulb in the lamp by the bed. I have yet to find a 3 way CFL that is anything other than 50/100/150W equivalent, which ends up being really huge to be able to put out the top light level. That would be fine except it won't fit in the lamp I have. Dimmable flood CFLs exist as well but it looks like they may not fit exactly in the track light fixture I have.