UDP packets to PC behind NAT

John J. Lee jjl at pobox.com
Sat Sep 16 20:48:13 EDT 2006


"Janto Dreijer" <jantod at gmail.com> writes:

> Steve Holden wrote:
> > Note that TCP and UDP port spaces are disjoint, so there's no way for
> > TCP and UDP to use "the same port" - they can, however, use the same
> > port number. Basically the TCP and UDP spaces have nothing to do with
> > each other.
> >
> > Most dynamic NAT gateways will respond to an outgoing UDP datagram by
> > mapping the internal client's UDP port to a UDP port on the NAT
> > gateway's external interface, and setting a converse mapping that will
> > allow the server to respond, even though technically there isn't a
> > "connection". The NAT table entries will typically be timed out after a
> > short period of non-use.
> 
> So are you saying one can't use TCP to punch a hole for UDP?

If server and client know what to do it's always possible to tunnel
anything over anything, but as Steve explained, there would be no need
for the UDP and TCP port numbers to match (and of course, tunneling
UDP over TCP is a slightly odd thing to be doing :-).


John



More information about the Python-list mailing list