Under The Microscope

Archive for January 1st, 2006

PMPing Is Easy

Back in July of 2005, we released Nicecast 1.8. One of the major, but unseen features in this update was support for UPnP and NAT-PMP routers, using Michael Milvich’s Port Mapper Library. We mentioned this at the time, but a search for NAT-PMP on the web reveals very little information, so I thought we’d cover it a bit more.

NAT-PMP
To provide a bit of background, NAT-PMP is Apple’s alternative to the more common UPnP protocol implemented in many routers. Like UPnP, NAT-PMP allows an application to request all traffic coming in to a network on a specific port. Nicecast makes uses of this by requesting traffic on port 8000 (by default), making it possible for outside listeners to connect without any setup being necessary. Currently, only Apple’s AirPort routers support NAT-PMP, but this is one of the most common routers found in our users’ LAN setups.

The biggest problem is that NAT-PMP is off by default, and few users know to turn it on. To enable it, you need to be running AirPort 4.2 or later. To check your version, open up AirPort Admin Utility (AAU), in the Applications -> Utilities folder, and choose “About AirPort Admin Utility” from the AirPort Admin Utility menu. If you’re not running 4.2 yet, use Software Update in the System Preferences to get it. As well, if AAU asks you to update your base station’s firmware, be sure to do so.

In AAU, go to the “AirPort” tab and click the “Base Station Options…” button, as seen below in Figure #1.


Figure #1

In the sheet that drops down (shown in Figure #2), turn on the “Enable NAT Port Mapping Protocol” checkbox in the “Ethernet Port Security” tab.


Figure #2

The note Apple has placed regarding 10.4 is incorrect. Nicecast will work with NAT-PMP on OS X 10.3 as well. Click OK, then click Update and the AirPort router will restart. That’s all there is to turning on NAT-PMP in AirPort Base Stations. This can be used with any application that supports NAT-PMP, but currently those are few in number. Hopefully, more applications will begin to take advantage of this.

To use it with Nicecast, just launch Nicecast and it will automatically work with the router to allow outside connections. As long as there are no other routers on the LAN, you should be all set.