>
> Hi,
> we just noticed that Linux's IP-Masquerade NAT implementation
> assigns a new local port number for each outgoing UDP 'session',
> even if the sessions all use the same local port number.
>
> This is definitely a fly in my ointment. My peer-peer game networking
> scheme for NAT support assumed that each session would be
> assigned the same local port number in this case.
>
> What does your NAT implementation assign for the port number
> when a host behind the NAT sends a UDP packet from port N
> to host A and then to host B? Does it generate the same local address
> for both?
>
> Thanks,
> Dan
Really? I will forward this to the masq mailing list, as i was NOT aware
of this behavior. I thought the local ip/port had a one-to-one mapping
to the visible port number, and if the local host used the same source port
for two separate "sessions" (processes, threads, what have you) the same
external visible port would be used for both, seeing as the masq router
has NO way of knowing they are "separate" sessions; i.e. it just looks up the
ip/port pair in the Masq database, and either uses the existing entry or
allocates a new (visible) port for the pair if the pair isn't in the database.
btw. It WILL allocate a new external port if the other ip/port pair expired.
The expiry time is rather short, so if you don't keep the entry "fresh"
by periodically using the ip/port pair it will be deleted.
For udp this is a fixed timeout and can be set by the user. Mine is at 30
seconds, but i don't know the default.
Masq ppl: any comments?
--
"Ask Bill why function code 9 [in QDOS and still in MS-DOS, more than ten
years later] ends in a dollar sign. No one in the world knows that but me."
- Gary Killdall, author of CP/M
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For daily digest info, email [EMAIL PROTECTED]