NAT-PMP not honoring requested external port
NAT-PMP not honoring requested external port
- Subject: NAT-PMP not honoring requested external port
- From: Jens Alfke <email@hidden>
- Date: Mon, 9 Jun 2008 09:48:12 -0700
I'm working on a P2P app, which uses DNSServiceNATPortMappingCreate to
request a public TCP port mapping from the local NAT (if any). It
works fine, with one problem: Apple AirPort routers don't appear to
honor the requested external port number, instead assigning a randomly-
numbered port every time.
I haven't seen this behavior with non-Apple routers (using UPnP,
presumably) — both of the cheapo routers I've personally tested with
assign the port number I ask for.
I know this is valid behavior according to the spec, but it's a
problem for P2P discovery, because it prevents other clients from
being able to cache this peer's IP address and reconnect to it later.
(Obviously such caching is not going to be 100% reliable anyway, but
in practice most home cable/DSL connections seem to keep the same IP
address for long periods of time; so if the port number could be kept
static too, the caching would work pretty well.)
Is there any way around this? Perhaps I'm using a port number in a
range the base station doesn't allow? (I use 60506 by default.)
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden